contiki-os/contiki — pull request #495 by wpwrak (2013-12-07 00:46:33+00:00)
Title: core/sys/rtimer.h, rtimer.c: support multiple timers; allow cancellation

This rewrite of rtimers introduces the following changes:

- more than one rtimer can be used concurrently

Some operations are O(n) for the number of active rtimers, so
their number should still not be excessive.

- when setting an rtimer, the handler is guaranteed to be called
exactly once. Before, it could also happen that it was never
called or that it was only called with a very large delay,
depending on the underlying architecture support.

- rtimers can be cancelled with rtimer_cancel. Cancellation means
that the handler function will not be invoked after rtimer_cancel
returns. The rtimer structure may still be used internally and
must not be overwritten or deallocated.