Defs: timeout
This header provides an interface for simplistic timers used for timeout waiting. Currently they are based on the RTC with a resolution of 1/128 s.
Functions
Section titled “Functions”timeout_make_ms
Section titled “timeout_make_ms”static inline timeout_t timeout_make_ms(int ms) { return clock() + (int64_t)ms * CLOCKS_PER_SEC / 1000; }timeout_elapsed
Section titled “timeout_elapsed”static inline bool timeout_elapsed(timeout_t const *t) { return t && clock() >= *t; }typedef clock_t timeout_t