summaryrefslogtreecommitdiff
path: root/src/common/timer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/timer.hpp')
-rw-r--r--src/common/timer.hpp25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/common/timer.hpp b/src/common/timer.hpp
index 876d519..c581377 100644
--- a/src/common/timer.hpp
+++ b/src/common/timer.hpp
@@ -5,12 +5,6 @@
# include "sanity.hpp"
-# include <chrono>
-# include <functional>
-
-/// (to get additional arguments, use std::bind or a lambda).
-typedef std::function<void (TimerData *, tick_t)> timer_func;
-
// updated automatically when using milli_clock::now()
// which is done only by core.cpp
extern tick_t gettick_cache;
@@ -21,23 +15,8 @@ tick_t gettick(void)
return gettick_cache;
}
-/// Schedule a one-shot timer at the given tick.
-/// The timer will automatically be freed after it is called
-/// (during a do_timer).
-TimerData *add_timer(tick_t t, timer_func f);
-
-/// Schedule a recurring timer initially at the given tick.
-/// The timer will automatically reregister itself, with the same
-/// opaque handle, every interval after the tick.
-/// It will never be freed unless you use delete_timer.
-TimerData *add_timer_interval(tick_t, timer_func, interval_t);
-
-/// Cancel the given timer.
-/// This doesn't actually remove it, it just resets the functor.
-/// and waits for the the tick to arrive in do_timer.
-void delete_timer(TimerData *);
-
-/// Do all timers scheduled before tick, and return the number of milliseconds until the next timer happens
+/// Do all timers scheduled before tick, and return the number of
+/// milliseconds until the next timer happens
interval_t do_timer(tick_t tick);
/// Stat a file, and return its modification time, truncated to seconds.