mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Change balance_duration() nanoseconds from a JS to Crypto BigInt
Similar to the preceding commit.
This commit is contained in:
parent
48856498f0
commit
360c65e92b
Notes:
sideshowbarker
2024-07-17 17:06:17 +09:00
Author: https://github.com/linusg
Commit: 360c65e92b
Pull-request: https://github.com/SerenityOS/serenity/pull/13124
Reviewed-by: https://github.com/IdanHo ✅
12 changed files with 28 additions and 35 deletions
|
@ -443,7 +443,7 @@ ThrowCompletionOr<String> Console::value_vector_to_string(Vector<Value>& values)
|
|||
ThrowCompletionOr<String> Console::format_time_since(Core::ElapsedTimer timer)
|
||||
{
|
||||
auto elapsed_ms = timer.elapsed_time().to_milliseconds();
|
||||
auto duration = TRY(Temporal::balance_duration(global_object(), 0, 0, 0, 0, elapsed_ms, 0, *js_bigint(vm(), "0"_sbigint), "year"));
|
||||
auto duration = TRY(Temporal::balance_duration(global_object(), 0, 0, 0, 0, elapsed_ms, 0, "0"_sbigint, "year"));
|
||||
|
||||
auto append = [&](StringBuilder& builder, auto format, auto... number) {
|
||||
if (!builder.is_empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue