MCPcopy Create free account
hub / github.com/cutechess/cutechess / humaniseTime

Method humaniseTime

projects/gui/src/threadedtask.cpp:87–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87QString ThreadedTask::humaniseTime(int sec) const
88{
89 if (sec <= 5)
90 return QString(tr("About 5 seconds"));
91
92 if (sec <= 10)
93 return QString(tr("About 10 seconds"));
94
95 if (sec <= 60)
96 return QString(tr("Less than a minute"));
97
98 if (sec <= 120)
99 return QString(tr("About a minute"));
100
101 return QString(tr("About %1 minutes").arg(sec / 60));
102}

Callers

nothing calls this directly

Calls 1

QStringClass · 0.50

Tested by

no test coverage detected