[riot-notifications] [RIOT] sys: add new timer subsystem (#2926)

Kaspar Schleiser notifications at github.com
Thu Jun 4 11:29:44 CEST 2015


> +    wtimer_spin_until(offset);
> +}
> +
> +static inline void wtimer_usleep(uint32_t offset)
> +{
> +    _wtimer_sleep(offset, 0);
> +}
> +
> +static inline void wtimer_usleep64(uint64_t microseconds)
> +{
> +    _wtimer_sleep((uint32_t) microseconds, (uint32_t) (microseconds >> 32));
> +}
> +
> +static inline void wtimer_sleep(uint32_t seconds)
> +{
> +    wtimer_usleep64((uint64_t)seconds*1000000);

2^32 * 1.000.000 is always smaller than 2^64. Will test on avr.

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


More information about the notifications mailing list