aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ktime.h
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-07-18 20:38:57 -0400
committerSteve French <sfrench@us.ibm.com>2007-07-18 20:38:57 -0400
commit1ff8392c32a2645d2665ca779ecb91bb29361c13 (patch)
tree860b95e9a499ade4060848740fc6ce1fbb4e4e8d /include/linux/ktime.h
parent70b315b0dd3879cb3ab8aadffb14f10b2d19b9c3 (diff)
parent5bae7ac9feba925fd0099057f6b23d7be80b7b41 (diff)
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: fs/cifs/export.c
Diffstat (limited to 'include/linux/ktime.h')
-rw-r--r--include/linux/ktime.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index 2b139f66027f..dae7143644fe 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -279,6 +279,16 @@ static inline s64 ktime_to_us(const ktime_t kt)
279 return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec; 279 return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec;
280} 280}
281 281
282static inline s64 ktime_us_delta(const ktime_t later, const ktime_t earlier)
283{
284 return ktime_to_us(ktime_sub(later, earlier));
285}
286
287static inline ktime_t ktime_add_us(const ktime_t kt, const u64 usec)
288{
289 return ktime_add_ns(kt, usec * 1000);
290}
291
282/* 292/*
283 * The resolution of the clocks. The resolution value is returned in 293 * The resolution of the clocks. The resolution value is returned in
284 * the clock_getres() system call to give application programmers an 294 * the clock_getres() system call to give application programmers an