Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/rust/helpers/time.c
29266 views
1
// SPDX-License-Identifier: GPL-2.0
2
3
#include <linux/delay.h>
4
#include <linux/ktime.h>
5
#include <linux/timekeeping.h>
6
7
void rust_helper_fsleep(unsigned long usecs)
8
{
9
fsleep(usecs);
10
}
11
12
ktime_t rust_helper_ktime_get_real(void)
13
{
14
return ktime_get_real();
15
}
16
17
ktime_t rust_helper_ktime_get_boottime(void)
18
{
19
return ktime_get_boottime();
20
}
21
22
ktime_t rust_helper_ktime_get_clocktai(void)
23
{
24
return ktime_get_clocktai();
25
}
26
27
s64 rust_helper_ktime_to_us(const ktime_t kt)
28
{
29
return ktime_to_us(kt);
30
}
31
32
s64 rust_helper_ktime_to_ms(const ktime_t kt)
33
{
34
return ktime_to_ms(kt);
35
}
36
37