]> git.hungrycats.org Git - linux/commitdiff
[PATCH] M68k sched_clock()
authorGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 29 Sep 2003 03:04:14 +0000 (20:04 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 29 Sep 2003 03:04:14 +0000 (20:04 -0700)
M68k: Add sched_clock() (introduced in 2.6.0-test6)

arch/m68k/kernel/time.c

index f22ec274377358c902830e29c08d856bd457d341..8934a229abeff150e7dd1716b218c802f917f3a2 100644 (file)
@@ -171,3 +171,12 @@ int do_settimeofday(struct timespec *tv)
        write_sequnlock_irq(&xtime_lock);
        return 0;
 }
+
+/*
+ * Scheduler clock - returns current time in ns units.
+ */
+unsigned long long sched_clock(void)
+{
+       return (unsigned long long)jiffies*(1000000000/HZ);
+}
+