Commit 7fe83ffc authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[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: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1636cf74
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment