Skip to content

Commit

Permalink
Merge pull request #44 from WadeGulbrandsen/patch-1
Browse files Browse the repository at this point in the history
fix #33 monotonic_now() to be OS agnostic
  • Loading branch information
massivefermion authored Dec 18, 2024
2 parents 7736c64 + c533716 commit 8689571
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/birl_ffi.erl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ local_timezone() ->
monotonic_now() ->
StartTime = erlang:system_info(start_time),
CurrentTime = erlang:monotonic_time(),
(CurrentTime - StartTime) div 1_000.
Difference = (CurrentTime - StartTime),
erlang:convert_time_unit(Difference, native, microsecond).

to_parts(Timestamp, Offset) ->
{Date, {Hour, Minute, Second}} = calendar:system_time_to_universal_time(
Expand Down

0 comments on commit 8689571

Please sign in to comment.