summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2005-02-01 16:48:52 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-02-01 16:48:52 -0800
commit7fe83ffc3cb040fd0ef50cc7e3e33dbc46595b75 (patch)
tree32f4b2268d357f6dd81f3527d28c5ccb27aa6891 /include
parent1636cf74f1f49e0afc0b4a3a6cdca28e4d103c10 (diff)
[PATCH] cputime: simplifiy generic cputime_to_secs/secs_to_cputime
The cputime_to_secs and secs_to_cputime primitives in include/asm-generic/cputime.h can be simplified since the default cputime implementation assumes that cputime is measured in jiffies. The intermediate conversion to milliseconds is superflous. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/cputime.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h
index 9ccdb6084dae..7943c66945be 100644
--- a/include/asm-generic/cputime.h
+++ b/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) / 1000)
-#define secs_to_cputime(__secs) (msecs_to_jiffies((__secs) * 1000))
+#define cputime_to_secs(jif) ((jif) / HZ)
+#define secs_to_cputime(sec) ((sec) * HZ)
/*
* Convert cputime to timespec and back.