Skip to content

Commit 7bea472

Browse files
committed
minor #20469 [Console] Add support of millisecondes for formatTime (SebLevDev)
This PR was merged into the 7.3 branch. Discussion ---------- [Console] Add support of millisecondes for `formatTime` Fixe #20460 Commits ------- b66e743 [Console] Add support of millisecondes for formatTime
2 parents b7f126c + b66e743 commit 7bea472

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

components/console/helpers/formatterhelper.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,12 @@ Sometimes you want to format seconds to time. This is possible with the
129129
The first argument is the seconds to format and the second argument is the
130130
precision (default ``1``) of the result::
131131

132-
Helper::formatTime(42); // 42 secs
133-
Helper::formatTime(125); // 2 mins
134-
Helper::formatTime(125, 2); // 2 mins, 5 secs
135-
Helper::formatTime(172799, 4); // 1 day, 23 hrs, 59 mins, 59 secs
132+
Helper::formatTime(0.001); // 1 ms
133+
Helper::formatTime(42); // 42 s
134+
Helper::formatTime(125); // 2 min
135+
Helper::formatTime(125, 2); // 2 min, 5 s
136+
Helper::formatTime(172799, 4); // 1 d, 23 h, 59 min, 59 s
137+
Helper::formatTime(172799.056, 5); // 1 d, 23 h, 59 min, 59 s, 56 ms
136138

137139
Formatting Memory
138140
-----------------

0 commit comments

Comments
 (0)