Skip to content

[Console] Add support of millisecondes for formatTime #20469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading