[riot-notifications] [RIOT] fix the bloody longterm vtimer bug (#374)

LudwigOrtmann notifications at github.com
Fri Nov 22 20:56:43 CET 2013


@kaspar030 This will need your ACK for the license again.

While you're at it: If you can still explain the purpose of https://github.com/RIOT-OS/RIOT/blob/master/sys/vtimer/vtimer.c#L70 I'll forgive you for not commenting it in the first place ;-)
```
    uint32_t next = hwtimer_next_absolute + longterm_tick_start;
    uint32_t now = HWTIMER_TICKS_TO_US(hwtimer_now());

    /* <YOUR COMMENT HERE> */
    if((next - HWTIMER_TICKS_TO_US(VTIMER_THRESHOLD) - now) > MICROSECONDS_PER_TICK ) {
        next = now + HWTIMER_TICKS_TO_US(VTIMER_BACKOFF);
    }
    
    hwtimer_id = hwtimer_set_absolute(HWTIMER_TICKS(next), vtimer_callback, NULL);
```

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/374#issuecomment-29104124
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20131122/df57d96a/attachment.html>


More information about the notifications mailing list