summaryrefslogtreecommitdiffstats
path: root/src/xtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xtime.h')
-rw-r--r--src/xtime.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/xtime.h b/src/xtime.h
index 11f2bf9..2927a2e 100644
--- a/src/xtime.h
+++ b/src/xtime.h
@@ -46,4 +46,27 @@ int xtimegm(struct tm *tm, time_t *timep);
*/
int xgetdate(const char *str, struct timespec *result);
+/**
+ * A timer.
+ */
+struct timer;
+
+/**
+ * Start a timer.
+ *
+ * @interval
+ * The regular interval at which to send SIGALRM.
+ * @return
+ * The new timer on success, otherwise NULL.
+ */
+struct timer *xtimer_start(const struct timespec *interval);
+
+/**
+ * Stop a timer.
+ *
+ * @timer
+ * The timer to stop.
+ */
+void xtimer_stop(struct timer *timer);
+
#endif // BFS_XTIME_H