Skip to content

Commit

Permalink
[Console] Add support of millisecondes for formatTime
Browse files Browse the repository at this point in the history
  • Loading branch information
SebLevDev authored Dec 11, 2024
1 parent b7f126c commit b66e743
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/console/helpers/formatterhelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ Sometimes you want to format seconds to time. This is possible with the
The first argument is the seconds to format and the second argument is the
precision (default ``1``) of the result::

Helper::formatTime(42); // 42 secs
Helper::formatTime(125); // 2 mins
Helper::formatTime(125, 2); // 2 mins, 5 secs
Helper::formatTime(172799, 4); // 1 day, 23 hrs, 59 mins, 59 secs
Helper::formatTime(0.001); // 1 ms
Helper::formatTime(42); // 42 s
Helper::formatTime(125); // 2 min
Helper::formatTime(125, 2); // 2 min, 5 s
Helper::formatTime(172799, 4); // 1 d, 23 h, 59 min, 59 s
Helper::formatTime(172799.056, 5); // 1 d, 23 h, 59 min, 59 s, 56 ms

Formatting Memory
-----------------
Expand Down

0 comments on commit b66e743

Please sign in to comment.