[riot-devel] vtimer implementation

Milan Babel babel at inf.fu-berlin.de
Wed Aug 21 15:53:54 CEST 2013

Hi *,

some of you may knows that there several problems in the vtimer at the 
I would like to ask you to report issues you have spotted and also 
comment my suggested changes.

Issues I know:
* long_term is everytime 4096 seconds, regardless if the hwtimer is able 
to measure this amount of time
* seconds are only updated on long_term (each 4096 seconds)
* vtimer is not tickless (through long_term)
* When setting two timers very close to each other the second is 
sometimes never called
* shortterm_queue_root.next is not set in every case update_shortterm is 
* The maximum value of a timex_t can exceed the maximum measurement of 
the vtimer (now + MAX(timex_t) > MAX(timex_t) for each now > 0)

I would prefer to not use long_term updates at the behavior it is used 
now. I would suggest to only use a long_term update before the hwtimer 
I also would like to update seconds every time a set or now or callback 
function is called.
When calling update_shorttime all timers should be triggered that are in 
the past + the amount needed to set the timer.
If a timer is set with a value greater than the value the vtimer can 
handle vtimer_set should only return -1 and do nothing.

Please let me know what you think and what kind of issues you had with 
the vtimer.


More information about the devel mailing list