diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-06 19:10:58 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-06 19:10:58 -0700 |
commit | 62a402d05aa2b4722201506794fd20e95b05845c (patch) | |
tree | bf3944fe4d96c38664fa5e3015cf1f311bc06361 /launcher/MMCTime.h | |
parent | d0b6f0124b41f8e279df5b224c975d03b3631b1e (diff) | |
download | PrismLauncher-62a402d05aa2b4722201506794fd20e95b05845c.tar.gz PrismLauncher-62a402d05aa2b4722201506794fd20e95b05845c.tar.bz2 PrismLauncher-62a402d05aa2b4722201506794fd20e95b05845c.zip |
refactor: move functions to utils + code-review fixes
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
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..576b837f 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 `percison` 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); } |