Convert UCTimers to use UCoreClock
This commit is contained in:
+2
-4
@@ -74,10 +74,9 @@ int iomux_run(struct IOMux *mux)
|
||||
if (uc_timers_first(&mux->timers, &first_timer) == 0) {
|
||||
future_to_interval(&first_timer, &mux->now, &timeout);
|
||||
timeoutp = &timeout;
|
||||
/* fprintf(stdout, "now %d %d future %d %d interval %d %d\n", mux->now.tv_sec, mux->now.tv_usec,
|
||||
/* TRACEF("now %d %d future %d %d interval %d %d\n", mux->now.tv_sec, mux->now.tv_usec,
|
||||
first_timer.tv_sec, first_timer.tv_usec,
|
||||
timeout.tv_sec, timeout.tv_usec);
|
||||
fflush(stdout);
|
||||
*/
|
||||
|
||||
assert(timeout.tv_sec >= 0);
|
||||
@@ -101,9 +100,8 @@ int iomux_run(struct IOMux *mux)
|
||||
int iomux_timers_run(struct IOMux *mux)
|
||||
{
|
||||
int event_cnt;
|
||||
gettimeofday(&mux->now, NULL);
|
||||
|
||||
event_cnt = uc_timers_run(&mux->timers, &mux->now);
|
||||
event_cnt = uc_timers_run(&mux->timers);
|
||||
assert(event_cnt >= 0);
|
||||
|
||||
return event_cnt;
|
||||
|
||||
Reference in New Issue
Block a user