]> err.no Git - linux-2.6/blobdiff - include/linux/ktime.h
m68k: remove unused adb.h
[linux-2.6] / include / linux / ktime.h
index 248305bb9a181681e837667a9fa0f005330a3fa0..81bb9c7a4eb3fec22b97ea1c2c1cd17e5baffd23 100644 (file)
@@ -259,6 +259,12 @@ static inline s64 ktime_to_ns(const ktime_t kt)
 
 #endif
 
+static inline s64 ktime_to_us(const ktime_t kt)
+{
+       struct timeval tv = ktime_to_timeval(kt);
+       return (s64) tv.tv_sec * USEC_PER_SEC + tv.tv_usec;
+}
+
 /*
  * The resolution of the clocks. The resolution value is returned in
  * the clock_getres() system call to give application programmers an