MCPcopy Create free account
hub / github.com/Adaptix-Framework/AdaptixC2 / FormatSecToStr

Function FormatSecToStr

AdaptixClient/Source/Utils/Convert.cpp:251–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249*/
250
251QString FormatSecToStr(int seconds)
252{
253 QString result = "";
254 int hours = seconds / 3600;
255 int minutes = (seconds % 3600) / 60;
256 int secs = seconds % 60;
257
258 if (hours > 0)
259 result += QString::number(hours) + "h ";
260 if (minutes > 0)
261 result += QString::number(minutes) + "m ";
262 if (secs > 0 || result.isEmpty())
263 result += QString::number(secs) + "s";
264
265 return result.trimmed();
266}
267
268QString TrimmedEnds(QString str)
269{

Callers 2

dataMethod · 0.85
updateLastItemsMethod · 0.85

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected