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

Remove dependency on monotonic clock. #215

Open
yomimono opened this issue Jun 17, 2016 · 3 comments
Open

Remove dependency on monotonic clock. #215

yomimono opened this issue Jun 17, 2016 · 3 comments

Comments

@yomimono
Copy link
Contributor

yomimono commented Jun 17, 2016

See https://lists.xenproject.org/archives/html/mirageos-devel/2016-06/msg00021.html for details -- timers in arpv4.ml, ndpv6.ml, and window.ml use wall-clock monotonic time and occasionally firing tick thread, but could use sleeping threads instead to avoid needing to reference a clock.

@hannesm
Copy link
Member

hannesm commented Jul 29, 2016

for arp, there is https://github.com/hannesm/arp which is independent of Clock... still uses Time.sleep_ns for its tick thread

@yomimono yomimono changed the title Remove dependency on V1.CLOCK. Remove dependency on monotonic clock. Nov 18, 2016
@yomimono
Copy link
Contributor Author

yomimono commented Nov 18, 2016

I've updated this issue to reflect the MCLOCK/PCLOCK split in mirage-types; the dependencies here are on MCLOCK rather than PCLOCK, which is lighter. We should still evaluate refactoring to remove the dependency entirely IMO.

@hannesm
Copy link
Member

hannesm commented Mar 9, 2019

as far as I'm concerned, we should have support for scheduling reoccuring tasks (Lwt_engine.on_timer comes to mind) in MirageOS. manually writing Lwt.async (fun () ->let rec go () = ... sleep n.. go () in go ()) is barely sustainable (plus the sleep n is wrong, since you want to schedule every n ms rather than 'do something ; sleep n ms ; do it again' (which then includes the execution time of the code run).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants