From 7c5c2058e9aea996dc6c76a7e6d9ba4fc2a2bc77 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Mon, 30 Jun 2014 16:47:03 -0700 Subject: It's about time I did this --- src/net/timer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/net/timer.cpp') diff --git a/src/net/timer.cpp b/src/net/timer.cpp index 8d03c17..6a22616 100644 --- a/src/net/timer.cpp +++ b/src/net/timer.cpp @@ -166,7 +166,7 @@ interval_t do_timer(tick_t tick) { /// Number of milliseconds until it calls this again // this says to wait 1 sec if all timers get popped - interval_t nextmin = std::chrono::seconds(1); + interval_t nextmin = 1_s; while (dumb_ptr td = top_timer_heap()) { @@ -186,7 +186,7 @@ interval_t do_timer(tick_t tick) td->owner->detach(); // If we are too far past the requested tick, call with // the current tick instead to fix reregistration problems - if (td->tick + std::chrono::seconds(1) < tick) + if (td->tick + 1_s < tick) td->func(td.operator->(), tick); else td->func(td.operator->(), td->tick); @@ -196,14 +196,14 @@ interval_t do_timer(tick_t tick) td.delete_(); continue; } - if (td->tick + std::chrono::seconds(1) < tick) + if (td->tick + 1_s < tick) td->tick = tick + td->interval; else td->tick += td->interval; push_timer_heap(td); } - return std::max(nextmin, std::chrono::milliseconds(10)); + return std::max(nextmin, 10_ms); } tick_t file_modified(ZString name) -- cgit v1.2.3-70-g09d2