/** * \file * \brief Support of one-shot timers * * To simplify things we maintain one timer for the scheduler, and one for the * wakeup infrastructure. Each of these subsystems is responsible for updating * their timer value. When an update happens, we update the hardware timer if * the previous (global) timer has changed. */ /* * Copyright (c) 2011, ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. */ #include #include /* these are systime_t i.e., absolute time values in ms */ static systime_t next_sched_timer = TIMER_INF; //< timer for scheduler static systime_t next_wakeup_timer = TIMER_INF; //< timer for wakeups static systime_t last_timer; //< last set timer #define MIN(x,y) ((x