Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1// SPDX-License-Identifier: GPL-2.0
2
3#include <linux/delay.h>
4#include <linux/ktime.h>
5#include <linux/timekeeping.h>
6
7void rust_helper_fsleep(unsigned long usecs)
8{
9 fsleep(usecs);
10}
11
12ktime_t rust_helper_ktime_get_real(void)
13{
14 return ktime_get_real();
15}
16
17ktime_t rust_helper_ktime_get_boottime(void)
18{
19 return ktime_get_boottime();
20}
21
22ktime_t rust_helper_ktime_get_clocktai(void)
23{
24 return ktime_get_clocktai();
25}
26
27s64 rust_helper_ktime_to_us(const ktime_t kt)
28{
29 return ktime_to_us(kt);
30}
31
32s64 rust_helper_ktime_to_ms(const ktime_t kt)
33{
34 return ktime_to_ms(kt);
35}
36
37void rust_helper_udelay(unsigned long usec)
38{
39 udelay(usec);
40}