]> git.neil.brown.name Git - history.git/commitdiff
[ARM] Add sched_clock()
authorHolger Schurig <h.schurig@de.rmk.(none)>
Tue, 23 Sep 2003 15:54:49 +0000 (16:54 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Tue, 23 Sep 2003 15:54:49 +0000 (16:54 +0100)
(comments by rmk, patch from Holger Schurig)

sched_clock() needs to be provided by all architectures - this cset
adds support for ARM.

arch/arm/kernel/time.c

index 8916a723d2611071e0b0cd30eb6522cdfdccbccf..475350f53601d7ec676b37a296626b47ec377e35 100644 (file)
@@ -67,6 +67,16 @@ static unsigned long dummy_gettimeoffset(void)
  */
 unsigned long (*gettimeoffset)(void) = dummy_gettimeoffset;
 
+/*
+ * Scheduler clock - returns current time in nanosec units.
+ */
+unsigned long long sched_clock(void)
+{
+       unsigned long long this_offset;
+
+       return (unsigned long long)jiffies * (1000000000 / HZ);
+}
+
 /*
  * Handle kernel profile stuff...
  */