display used time to shred drive

This commit is contained in:
2022-05-11 23:45:05 +02:00
parent 818e78796d
commit 48bbad914f
7 changed files with 53 additions and 10 deletions

View File

@ -37,6 +37,7 @@ private:
uint32_t u32PowerCycles = 0U;
time_t u32Timestamp = 0U; //unix timestamp for detecting a frozen drive
double d32TaskPercentage = 0U; //in percent for Shred (1 to 100)
time_t u32TimestampTaskStart = 0U; //unix timestamp for duration of an action
private:
void setTimestamp();
@ -75,6 +76,9 @@ public:
void setTaskPercentage(double d32TaskPercentage);
double getTaskPercentage(void);
void setActionStartTimestamp();
time_t getActionStartTimestamp();
};
#endif // DRIVE_H_

View File

@ -29,7 +29,7 @@
#endif
// Logic
//#define DRYRUN //don´t touch the drives
#define DRYRUN //don´t touch the drives
#define FROZEN_ALERT //show alert if drive is frozen
//IPC pipes

View File

@ -56,7 +56,7 @@ private:
static WINDOW *createOverViewWindow( int iXSize, int iYSize);
static WINDOW *createDetailViewWindow( int iXSize, int iYSize, int iXStart, Drive drive);
static WINDOW *overwriteDetailViewWindow( int iXSize, int iYSize, int iXStart);
static WINDOW *createEntryWindow(int iXSize, int iYSize, int iXStart, int iYStart, string sModelFamily, string sModelName, string sCapacity, string sState, bool bSelected);
static WINDOW *createEntryWindow(int iXSize, int iYSize, int iXStart, int iYStart, string sModelFamily, string sModelName, string sCapacity, string sState, string sTime, bool bSelected);
static WINDOW *createSystemStats(int iXSize, int iYSize, int iXStart, int iYStart);
static WINDOW *createMenuView(int iXSize, int iYSize, int iXStart, int iYStart, struct MenuState menustate);
static WINDOW *createDialog(int iXSize, int iYSize, int iXStart, int iYStart, string selectedTask, string optionA, string optionB);
@ -65,5 +65,7 @@ private:
void displaySelectedDrive(Drive drive, int stdscrX, int stdscrY);
string calculateTimeDelta(time_t start, time_t end);
};
#endif // TUI_H_