39 #include "sys/clock.h"
40 #include "sys/cooja_mt.h"
42 #include "lib/simEnvChange.h"
47 #define PRINTF(...) printf(__VA_ARGS__)
52 extern clock_time_t simCurrentTime;
54 static int pending_rtimer = 0;
55 static rtimer_clock_t next_rtimer = 0;
56 static clock_time_t last_rtimer_now = 0;
60 rtimer_arch_init(
void)
68 rtimer_arch_schedule(rtimer_clock_t t)
75 rtimer_arch_next(
void)
81 rtimer_arch_pending(
void)
83 return pending_rtimer;
87 rtimer_arch_check(
void)
89 if (simCurrentTime == next_rtimer) {
101 if(last_rtimer_now == simCurrentTime) {
103 simProcessRunValue = 1;
104 simNextExpirationTime = simCurrentTime + 1;
107 last_rtimer_now = simCurrentTime;
108 return simCurrentTime;