aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/pyhelper.h
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/pyhelper.h')
-rw-r--r--klippy/pyhelper.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/klippy/pyhelper.h b/klippy/pyhelper.h
index 1042214b..d564c78b 100644
--- a/klippy/pyhelper.h
+++ b/klippy/pyhelper.h
@@ -1,6 +1,9 @@
#ifndef PYHELPER_H
#define PYHELPER_H
+#define likely(x) __builtin_expect(!!(x), 1)
+#define unlikely(x) __builtin_expect(!!(x), 0)
+
double get_monotonic(void);
struct timespec fill_time(double time);
void set_python_logging_callback(void (*func)(const char *));