Re: [Babel-users] Main Loop Frequency

2017-03-08 Thread Gabriel Kerneis
On Tue, Mar 7, 2017, at 22:41, Juliusz Chroboczek wrote: > timeval_min is only used with absolute times. Much clearer now. Thanks! -- Gabriel ___ Babel-users mailing list Babel-users@lists.alioth.debian.org

Re: [Babel-users] Main Loop Frequency

2017-03-07 Thread Gabriel Kerneis
On Tue, Mar 7, 2017, at 16:13, Juliusz Chroboczek wrote: > > The cleanest way I see would be to use timerfd, as Toke suggested, and > > integrate that in the list of file descriptors watched by select(). As a > > perhaps simpler alternative, you could also integrate your recurrent task > > in

Re: [Babel-users] Main Loop Frequency

2017-03-07 Thread Toke Høiland-Jørgensen
Lorenzo Ghiro writes: > Hi everybody! > > I would like to know how to schedule an operation (write to file) with > below-second frequency, any advise? > > My strategy up to now has been to check, in the main loop, how many > time passed from the last operation's

[Babel-users] Main Loop Frequency

2017-03-07 Thread Lorenzo Ghiro
Hi everybody! I would like to know how to schedule an operation (write to file) with below-second frequency, any advise? My strategy up to now has been to check, in the main loop, how many time passed from the last operation's occurence. Given that variable now is updated in every loop