xref: /linux/rust/helpers/time.c (revision ced9ccd21fbc8ca941e6a0c2820c2df89239ccb9)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 #include <linux/ktime.h>
4 #include <linux/timekeeping.h>
5 
6 ktime_t rust_helper_ktime_get_real(void)
7 {
8 	return ktime_get_real();
9 }
10 
11 ktime_t rust_helper_ktime_get_boottime(void)
12 {
13 	return ktime_get_boottime();
14 }
15 
16 ktime_t rust_helper_ktime_get_clocktai(void)
17 {
18 	return ktime_get_clocktai();
19 }
20 
21 s64 rust_helper_ktime_to_us(const ktime_t kt)
22 {
23 	return ktime_to_us(kt);
24 }
25 
26 s64 rust_helper_ktime_to_ms(const ktime_t kt)
27 {
28 	return ktime_to_ms(kt);
29 }
30