public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cputime.h seems to assume HZ==1000
@ 2005-01-18  1:57 Roland McGrath
  2005-01-18  2:46 ` Linus Torvalds
  0 siblings, 1 reply; 3+ messages in thread
From: Roland McGrath @ 2005-01-18  1:57 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

Shouldn't msecs mean msecs, not secs/HZ?

--- linux-2.6/include/asm-generic/cputime.h
+++ linux-2.6/include/asm-generic/cputime.h
@@ -35,8 +35,8 @@ typedef u64 cputime64_t;
 /*
  * Convert cputime to seconds and back.
  */
-#define cputime_to_secs(__ct)		(jiffies_to_msecs(__ct) / HZ)
-#define secs_to_cputime(__secs)		(msecs_to_jiffies(__secs * HZ))
+#define cputime_to_secs(__ct)		(jiffies_to_msecs(__ct) / 1000)
+#define secs_to_cputime(__secs)		(msecs_to_jiffies(__secs * 1000))
 
 /*
  * Convert cputime to timespec and back.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-01-20  0:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-18  1:57 [PATCH] cputime.h seems to assume HZ==1000 Roland McGrath
2005-01-18  2:46 ` Linus Torvalds
2005-01-20  0:18   ` George Anzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox