summaryrefslogtreecommitdiff
path: root/src/trackerlogic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/trackerlogic.h')
-rw-r--r--src/trackerlogic.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/trackerlogic.h b/src/trackerlogic.h
index d03d3b1..241b6a7 100644
--- a/src/trackerlogic.h
+++ b/src/trackerlogic.h
@@ -114,6 +114,11 @@ static inline ot_time time_since_minutes(ot_time then) {
114 114
115/* Has a deadline the tracker set on itself gone by? */ 115/* Has a deadline the tracker set on itself gone by? */
116static inline int time_is_past(ot_time deadline) { return time_now_seconds() > deadline; } 116static inline int time_is_past(ot_time deadline) { return time_now_seconds() > deadline; }
117
118/* The wall clock, which the state file uses and nothing else does: it has to
119 survive a restart, and the clock above counts from boot. */
120static inline ot_time time_wall_minutes(void) { return time(NULL) / 60; }
121
117/* Cleared from the interrupt handler and read by every worker */ 122/* Cleared from the interrupt handler and read by every worker */
118extern _Atomic int g_opentracker_running; 123extern _Atomic int g_opentracker_running;
119 124