c++ - Get elapsed time as a formatted string -


i looking simplest way calculate , display execution time of function in qt. result should string/qstring in format mm:ss.

i know can int of milliseconds qtime there built-in function formatting?

if have elapsed time in milliseconds (ms), can print time in mm:ss format in following way:

qstring out = qstring("%1:%2").arg( ms / 60000        , 2, 10, qchar('0'))                               .arg((ms % 60000) / 1000, 2, 10, qchar('0')); 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -