shithub: femtolisp

Download patch

ref: 13d881766a56adf8d3530c268af4c074d106a56c
parent: c0fe20c910ae4c52146f41c67400a7b545ea0cac
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Jan 7 21:07:39 EST 2025

add nanoseconds-monotonic builtin

--- a/builtins.c
+++ b/builtins.c
@@ -327,6 +327,13 @@
 	return mk_double(sec_realtime());
 }
 
+BUILTIN("nanoseconds-monotonic", nanoseconds_monotonic)
+{
+	argcount(nargs, 0);
+	USED(args);
+	return mk_uint64(nanosec_monotonic());
+}
+
 double
 todouble(value_t a)
 {