diff options
author | bde <bde@FreeBSD.org> | 1994-12-12 11:58:46 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1994-12-12 11:58:46 +0000 |
commit | 0d848d17c5da0a5c3ca6784b9e8ac2eb63a1e04e (patch) | |
tree | 3f63f28660d7050f5a12f0fe1a17607dc2b10b61 /sys/kern/kern_resource.c | |
parent | 3097328edf0de7ed793760a43fe341b9a3c1175c (diff) | |
download | FreeBSD-src-0d848d17c5da0a5c3ca6784b9e8ac2eb63a1e04e.zip FreeBSD-src-0d848d17c5da0a5c3ca6784b9e8ac2eb63a1e04e.tar.gz |
Obtained from: my old fix for 1.1.5
Improve hzto():
Round up instead of down and then add 1 tick. This fixes sleep(1)
sometimes sleeping for < 1 second and usleep(10000) sometimes sleeping
for as little as 1 usec + syscall time.
Don't do all the calculations at splhigh().
Don't depend on `tick' being a multiple of 1000.
Don't lose accuracy for `sec' between 0x7fffffff / 1000 - 1000 and
0x7fffffff / hz.
Don't assume that longs are 32 bits or that ints have the same size as
longs.
Diffstat (limited to 'sys/kern/kern_resource.c')
0 files changed, 0 insertions, 0 deletions