Skip to content
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

refactor: remove base_time from mono_clock #2492

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Green-Sky
Copy link
Member

@Green-Sky Green-Sky commented Dec 22, 2023

The unix time offset is not used anywhere and was causing issues on windows.

Please everyone check, I might have overlooked a "unix time" usage.

Also, I not that the function current_time_monotonic() should probably be removed and the only user seems to be net_crypto. This would remove the extra lock from the windows code path and clean up the code alot.


This change is Reviewable

@Green-Sky
Copy link
Member Author

@iphydf the fuzzer reproducibility never return 0 thingy, how do we properly solve it?

@iphydf iphydf force-pushed the mono_time_remove_base branch from 9fdf727 to 449912f Compare December 26, 2023 03:25
@zoff99
Copy link

zoff99 commented Dec 26, 2023

if you want to remove current_time_monotonic() what would be the replacement for it?
i use it a lot for toxav.
removing it without a replacement does not sound optimal.

@Green-Sky
Copy link
Member Author

@zoff99 call update on the clock more often. It is supposed to be a caching clock. Side stepping it is kind of wasteful. Especially on windows, where we have to carry around an extra mutex, just for the "sidestepping".

@Green-Sky Green-Sky force-pushed the mono_time_remove_base branch from 449912f to 3410fe2 Compare December 26, 2023 14:25
The unix time offset is not used anywhere and was causing issues on windows.
@iphydf iphydf force-pushed the mono_time_remove_base branch from 3410fe2 to 1f34bcb Compare December 27, 2023 03:34
@Green-Sky Green-Sky added this to the v0.2.20 milestone Dec 27, 2023
@iphydf iphydf modified the milestones: v0.2.20, v0.2.21 Nov 6, 2024
@Green-Sky Green-Sky modified the milestones: v0.2.21, v0.2.22 Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants