mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-05 22:25:16 +00:00
time: add ns_to_ktime()
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
79b3feffb1
commit
57d3da2911
1 changed files with 6 additions and 0 deletions
|
@ -327,4 +327,10 @@ extern void ktime_get_ts(struct timespec *ts);
|
||||||
/* Get the real (wall-) time in timespec format: */
|
/* Get the real (wall-) time in timespec format: */
|
||||||
#define ktime_get_real_ts(ts) getnstimeofday(ts)
|
#define ktime_get_real_ts(ts) getnstimeofday(ts)
|
||||||
|
|
||||||
|
static inline ktime_t ns_to_ktime(u64 ns)
|
||||||
|
{
|
||||||
|
static const ktime_t ktime_zero = { .tv64 = 0 };
|
||||||
|
return ktime_add_ns(ktime_zero, ns);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue