[S390] Fix timeval regression on s390

commit aa5e97ce4b
[PATCH] improve precision of process accounting.

Introduced a timing regression:
-bash-3.2# time ls
real    0m0.006s
user    0m1.754s
sys     0m1.094s

The problem was introduced by an error in cputime_to_timeval.
Cputime is now 1/4096 microsecond, therefore, we have to divide
the remainder with 4096 to get the microseconds.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
Christian Borntraeger 2009-02-19 15:19:00 +01:00 committed by Martin Schwidefsky
parent e2e5a0f2b1
commit d5cd0343d2
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ cputime_to_timeval(const cputime_t cputime, struct timeval *value)
value->tv_usec = rp.subreg.even / 4096;
value->tv_sec = rp.subreg.odd;
#else
value->tv_usec = cputime % 4096000000ULL;
value->tv_usec = (cputime % 4096000000ULL) / 4096;
value->tv_sec = cputime / 4096000000ULL;
#endif
}