aboutsummaryrefslogtreecommitdiff
path: root/launcher/MMCTime.h
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-12 01:13:17 -0700
committerGitHub <noreply@github.com>2023-05-12 01:13:17 -0700
commit6b6d6a01dc9cf05715f01e3a549740b169ef9ae3 (patch)
tree8ba9746a188c39003213839825552543e3f1a48f /launcher/MMCTime.h
parentf27716656c6f6006238203669a7a02f035733fc0 (diff)
parentc5aff7cc1ef43a1326bd3ce0c83e29669e2ff43f (diff)
downloadPrismLauncher-6b6d6a01dc9cf05715f01e3a549740b169ef9ae3.tar.gz
PrismLauncher-6b6d6a01dc9cf05715f01e3a549740b169ef9ae3.tar.bz2
PrismLauncher-6b6d6a01dc9cf05715f01e3a549740b169ef9ae3.zip
Merge branch 'develop' into fix/network_and_signals
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/MMCTime.h')
-rw-r--r--launcher/MMCTime.h9
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);
}