about summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index 5b5844fc135..0ccc83435f7 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -612,6 +612,12 @@ get_time(rust_task *task, uint32_t *sec, uint32_t *usec) {
 }
 #endif
 
+extern "C" CDECL void
+nano_time(rust_task *task, uint64_t *ns) {
+    timer t;
+    *ns = t.nano_time();
+}
+
 /**
  * Preallocates the exact number of bytes in the given interior vector.
  */