From 35cf0e4122c353b857b255cb300137e01a273053 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 27 Feb 2008 14:05:10 +0100 Subject: [PATCH] --- yaml --- r: 91057 b: refs/heads/master c: 57d3da2911787a101a384532f4519f9640bae883 h: refs/heads/master i: 91055: ac8545b9f9a2f4da0df595ccceb204152d68c604 v: v3 --- [refs] | 2 +- trunk/include/linux/ktime.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 120a260e6565..c7ab2f275dfe 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 79b3feffb10417f197d2ab48dd4fa3c0c9e7d788 +refs/heads/master: 57d3da2911787a101a384532f4519f9640bae883 diff --git a/trunk/include/linux/ktime.h b/trunk/include/linux/ktime.h index 2cd7fa73d1af..ce5983225be4 100644 --- a/trunk/include/linux/ktime.h +++ b/trunk/include/linux/ktime.h @@ -327,4 +327,10 @@ extern void ktime_get_ts(struct timespec *ts); /* Get the real (wall-) time in timespec format: */ #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