Menu

#35 late 1.01 timer clarifications

open
nobody
Time Mgmt (1)
1
2001-02-05
2001-02-05
Robert Lipe
No

1) Zero is an invalid value for a repeating timer request

The code should _OSDEP_ASSERT this.

2) The repeating timer will fire at the next environment timer granularity that will insure that at least the timeout period has occurred. For example, if a system has a repeating timer granularity of 100ms and a 10ms repeating timer request is made, the timeout callback will be invoked at the next 100ms timeout period that insures that at least 10ms has elapsed. If the request was made 20ms before a 100ms tick, the callback will be invoked at that next tick; the alternate interpretation was that the 10ms timeout value would be rounded up to 100ms and therefore the above callback wouldn't be delivered until 120ms after the request.

* The code inside start_repeating should be sure that `ticks' is set to an appropriate amount to make these guarantees. It looks like a timer of zero may be computed
in some cases. Bonus points can be earned for adding entries in timertest for exercising this.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB