[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: clockctl(4) vs settimeofday(2)
On Dec 7, 9:56am, rich.neswold%gmail.com@localhost (Rich Neswold) wrote:
-- Subject: Re: clockctl(4) vs settimeofday(2)
| > Using the syscall is simpler and cheaper, so I think the man page should
| > be updated.
| Is settimeofday() called frequently enough that "cheaper" is a concern?
| What is more correct (I don't know the answer)?
If you know that you are not going to succeed (because you are not
root), you should cache the fd, and just do the ioctl each time
you want to sync to reduce latency. The dumb caller is probably
an old program that probably is used to be running as root, so
reducing the delay/overhead for it by trying syscall first is better.
Main Index |
Thread Index |