diff options
Diffstat (limited to 'src/ext/timeouts')
-rw-r--r-- | src/ext/timeouts/timeout.c | 3 | ||||
-rw-r--r-- | src/ext/timeouts/timeout.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ext/timeouts/timeout.c b/src/ext/timeouts/timeout.c index 70bc0eba0a..dbc24fa00a 100644 --- a/src/ext/timeouts/timeout.c +++ b/src/ext/timeouts/timeout.c @@ -467,6 +467,9 @@ TIMEOUT_PUBLIC void timeouts_update(struct timeouts *T, abstime_t curtime) { return; } /* timeouts_update() */ +TIMEOUT_PUBLIC timeout_t timeouts_get_curtime(struct timeouts *T) { + return T->curtime; +} /* timeouts_get_curtime() */ TIMEOUT_PUBLIC void timeouts_step(struct timeouts *T, reltime_t elapsed) { timeouts_update(T, T->curtime + elapsed); diff --git a/src/ext/timeouts/timeout.h b/src/ext/timeouts/timeout.h index 6d7359a6a2..3b08f19255 100644 --- a/src/ext/timeouts/timeout.h +++ b/src/ext/timeouts/timeout.h @@ -177,6 +177,9 @@ TIMEOUT_PUBLIC void timeouts_update(struct timeouts *, timeout_t); TIMEOUT_PUBLIC void timeouts_step(struct timeouts *, timeout_t); /* step timing wheel by relative time */ +TIMEOUT_PUBLIC timeout_t timeouts_get_curtime(struct timeouts *); +/* Return the current tick. */ + TIMEOUT_PUBLIC timeout_t timeouts_timeout(struct timeouts *); /* return interval to next required update */ |