You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let now = birl.now()
let start_time =
birl.set_time_of_day(
now,
birl.TimeOfDay(hour: 8, minute: 0, second: 0, milli_second: 0),
)
let diff = birl.difference(now, start_time)
But this always returns Duration(0) because set_time_of_day doesn't seem to change the monotonic_time and difference uses the monotonic_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 a monotonic_time so the approach works.
The text was updated successfully, but these errors were encountered:
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.
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.The text was updated successfully, but these errors were encountered: