display also days
This commit is contained in:
parent
ecc8a71c64
commit
0e391cebf3
|
@ -29,7 +29,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Logic
|
// Logic
|
||||||
//#define DRYRUN //don´t touch the drives
|
#define DRYRUN //don´t touch the drives
|
||||||
#define FROZEN_ALERT //show alert if drive is frozen
|
#define FROZEN_ALERT //show alert if drive is frozen
|
||||||
|
|
||||||
//IPC pipes
|
//IPC pipes
|
||||||
|
|
|
@ -132,6 +132,7 @@ void Drive::setDriveSMARTData( string modelFamily,
|
||||||
u32ErrorCount = errorCount;
|
u32ErrorCount = errorCount;
|
||||||
u32PowerOnHours = powerOnHours;
|
u32PowerOnHours = powerOnHours;
|
||||||
u32PowerCycles = powerCycle;
|
u32PowerCycles = powerCycle;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Drive::setTimestamp()
|
void Drive::setTimestamp()
|
||||||
|
|
|
@ -451,11 +451,12 @@ WINDOW* TUI::createFrozenWarning(int iXSize, int iYSize, int iXStart, int iYStar
|
||||||
string TUI::formatTimeDuration(time_t u32Duration)
|
string TUI::formatTimeDuration(time_t u32Duration)
|
||||||
{
|
{
|
||||||
std::ostringstream out;
|
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 min=((int)((u32Duration)/60))%60;
|
||||||
int sec=(int)((u32Duration)%60);
|
int sec=(int)((u32Duration)%60);
|
||||||
char s[25];
|
char s[25];
|
||||||
sprintf(s, "%02d:%02d:%02d", hr, min, sec);
|
sprintf(s, "%02d:%02d:%02d:%02d", dy, hr, min, sec);
|
||||||
out << s;
|
out << s;
|
||||||
return out.str();
|
return out.str();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue