display also days
This commit is contained in:
parent
ecc8a71c64
commit
0e391cebf3
|
@ -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
|
||||
|
|
|
@ -132,6 +132,7 @@ void Drive::setDriveSMARTData( string modelFamily,
|
|||
u32ErrorCount = errorCount;
|
||||
u32PowerOnHours = powerOnHours;
|
||||
u32PowerCycles = powerCycle;
|
||||
|
||||
}
|
||||
|
||||
void Drive::setTimestamp()
|
||||
|
|
|
@ -451,11 +451,12 @@ WINDOW* TUI::createFrozenWarning(int iXSize, int iYSize, int iXStart, int iYStar
|
|||
string TUI::formatTimeDuration(time_t u32Duration)
|
||||
{
|
||||
std::ostringstream out;
|
||||
int hr=(int)((u32Duration)/3600);
|
||||
int dy=(int)((u32Duration)/86400);
|
||||
int hr=(int)(((u32Duration)/3600)%24);
|
||||
int min=((int)((u32Duration)/60))%60;
|
||||
int sec=(int)((u32Duration)%60);
|
||||
char s[25];
|
||||
sprintf(s, "%02d:%02d:%02d", hr, min, sec);
|
||||
sprintf(s, "%02d:%02d:%02d:%02d", dy, hr, min, sec);
|
||||
out << s;
|
||||
return out.str();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue