display shred duration after completion

This commit is contained in:
2022-05-12 07:40:24 +02:00
parent 48bbad914f
commit ecc8a71c64
5 changed files with 29 additions and 16 deletions

View File

@ -38,6 +38,7 @@ private:
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
time_t u32TaskDuration = 0U; //time needed to complete the task
private:
void setTimestamp();
@ -79,6 +80,9 @@ public:
void setActionStartTimestamp();
time_t getActionStartTimestamp();
void calculateTaskDuration();
time_t getTaskDuration();
};
#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

@ -64,8 +64,7 @@ private:
static WINDOW* createSmartWarning(int iXSize, int iYSize, int iXStart, int iYStart, string sPath, uint32_t u32PowerOnHours, uint32_t u32PowerCycles, uint32_t u32ErrorCount);
void displaySelectedDrive(Drive drive, int stdscrX, int stdscrY);
string calculateTimeDelta(time_t start, time_t end);
string formatTimeDuration(time_t u32Duration);
};
#endif // TUI_H_