diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-05-14 14:20:04 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-05-14 14:20:04 +0300 |
commit | 8c7fd3327ecfb31fde4ae843a5d66e0ef29026ff (patch) | |
tree | b48975200ce3eee6c5dbf1070c71b8d71ece1ffb /launcher/MMCTime.h | |
parent | e4449a0ba32593b4fd76e3f2ced176e5b3bbd952 (diff) | |
parent | d5c6a1b4d1e6d052e42366d19ffa0047168e030d (diff) | |
download | PrismLauncher-8c7fd3327ecfb31fde4ae843a5d66e0ef29026ff.tar.gz PrismLauncher-8c7fd3327ecfb31fde4ae843a5d66e0ef29026ff.tar.bz2 PrismLauncher-8c7fd3327ecfb31fde4ae843a5d66e0ef29026ff.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into Fix_Assert
Diffstat (limited to 'launcher/MMCTime.h')
-rw-r--r-- | launcher/MMCTime.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/launcher/MMCTime.h b/launcher/MMCTime.h index 10ff2ffe..6a5780b4 100644 --- a/launcher/MMCTime.h +++ b/launcher/MMCTime.h @@ -22,4 +22,13 @@ namespace Time { QString prettifyDuration(int64_t duration); +/** + * @brief Returns a string with short form time duration ie. `2days 1h3m4s56.0ms`. + * miliseconds are only included if `precision` is greater than 0. + * + * @param duration a number of seconds as floating point + * @param precision number of decmial points to display on fractons of a second, defualts to 0. + * @return QString + */ +QString humanReadableDuration(double duration, int precision = 0); } |