MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / formatDurationStr

Function formatDurationStr

src/qt/guiutil.cpp:792–810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

790}
791
792QString formatDurationStr(int secs)
793{
794 QStringList strList;
795 int days = secs / 86400;
796 int hours = (secs % 86400) / 3600;
797 int mins = (secs % 3600) / 60;
798 int seconds = secs % 60;
799
800 if (days)
801 strList.append(QString(QObject::tr("%1 d")).arg(days));
802 if (hours)
803 strList.append(QString(QObject::tr("%1 h")).arg(hours));
804 if (mins)
805 strList.append(QString(QObject::tr("%1 m")).arg(mins));
806 if (seconds || (!days && !hours && !mins))
807 strList.append(QString(QObject::tr("%1 s")).arg(seconds));
808
809 return strList.join(" ");
810}
811
812QString formatServicesStr(quint64 mask)
813{

Callers 2

setTrafficGraphRangeMethod · 0.85
updateNodeDetailMethod · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected