summaryrefslogtreecommitdiff
path: root/rust/helpers/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'rust/helpers/time.c')
-rw-r--r--rust/helpers/time.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/rust/helpers/time.c b/rust/helpers/time.c
new file mode 100644
index 000000000000..3d31473bce08
--- /dev/null
+++ b/rust/helpers/time.c
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/ktime.h>
+
+s64 rust_helper_ktime_to_us(const ktime_t kt)
+{
+ return ktime_to_us(kt);
+}
+
+s64 rust_helper_ktime_to_ms(const ktime_t kt)
+{
+ return ktime_to_ms(kt);
+}