[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] Timer library
In Lwt, you can use the core library to do timers by calling OS.sleep and building up the required abstractions. I notice that there is a Unix-only Lwt_timeout library in the distribution: http://ocsigen.org/lwt/2.4.7/api/Lwt_timeout The only use of Lwt_unix in this library is for Lwt_unix.sleep: https://github.com/ocsigen/lwt/blob/master/src/unix/lwt_timeout.ml So we could generalise this by modifying the Lwt_timeout.sleep () function to take a (?sleep) function that is passed in the relevant function. In the case of Mirage, this would be OS.Time.sleep, and in Unix the existing Lwt_unix.sleep. What other requirements do you have? Do you want these timers to be persistent in the case of restarts? -anil > On 23 Apr 2015, at 13:00, Nick Betteridge <buzzheavyyear@xxxxxxxxxxx> wrote: > > Hi, > > Can anyone recommend a good Timer library to use with mirage - I need it for > firing off events - add, stop, start, stop, pause, one-off, cyclic etc. > > Thanks, > Nick > _______________________________________________ > MirageOS-devel mailing list > MirageOS-devel@xxxxxxxxxxxxxxxxxxxx > http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |