mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-23 11:44:53 +00:00
Introduce mg_timer_expired(). Adopt DHCP and link status to use it
This commit is contained in:
1 parent
a113e344a1
commit
f9272d0959
5 files changed
+54
-62
No files matched your search
+1
-1
@@ -5,7 +5,6 @@
|
||||
struct mg_timer {
|
||||
unsigned long id; // Timer ID
|
||||
uint64_t period_ms; // Timer period in milliseconds
|
||||
uint64_t prev_ms; // Timestamp of a previous poll
|
||||
uint64_t expire; // Expiration timestamp in milliseconds
|
||||
unsigned flags; // Possible flags values below
|
||||
#define MG_TIMER_ONCE 0 // Call function once
|
||||
@@ -21,3 +20,4 @@ void mg_timer_init(struct mg_timer **head, struct mg_timer *timer,
|
||||
void *arg);
|
||||
void mg_timer_free(struct mg_timer **head, struct mg_timer *);
|
||||
void mg_timer_poll(struct mg_timer **head, uint64_t new_ms);
|
||||
bool mg_timer_expired(uint64_t *expiration, uint64_t period, uint64_t now);
|
||||
Reference in new issue
Block a user