Open michaeljones opened 5 months ago
Right now the monotonic time is just the time passed since the VM started. To implement this I should change it so that the momotonic time also indicates a specific moment.
Coming here to say that I understand monotonic time indicates the time passed since VM started, but then, why using it in compare
function? Currently, if two wall_time
are different, but monotonic_time
has a value, wall_time
are not taken into account.
When creating a new date, I currently uses birl.to_unix |> birl.from_unix
to make sure everything works as expected 🙂
I came across an issue where I tried to do:
But this always returns
Duration(0)
becauseset_time_of_day
doesn't seem to change themonotonic_time
anddifference
uses themonotonic_time
if it can?I'm afraid I'm not sure what the solution is. Possibly to set the monotonic time to
None
if it is not possible to calculate it from the new time of day.I have worked around it by converting
now
to an iso8601 string and re-parsing it at which point it doesn't have amonotonic_time
so the approach works.