Fixing internal security token problem

This commit is contained in:
stephb9959
2021-07-18 22:13:10 -07:00
parent c585dc9884
commit 734ce263ee
19 changed files with 181 additions and 113 deletions

View File

@@ -471,6 +471,17 @@ namespace uCentral::Utils {
return Result;
}
std::string SecondsToNiceText(uint64_t Seconds) {
std::string Result;
int Days = Seconds / (24*60*60);
Seconds -= Days * (24*60*60);
int Hours= Seconds / (60*60);
Seconds -= Hours * (60*60);
int Minutes = Seconds / 60;
Seconds -= Minutes * 60;
Result = std::to_string(Days) +" days, " + std::to_string(Hours) + ":" + std::to_string(Minutes) + ":" + std::to_string(Seconds);
return Result;
}
}