Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: clockctl(4) vs settimeofday(2)



In article <CAGT4q5pLjriO856uhFD_rZCXcW+e1XUUhZS6bN2fL21BMGSWNQ%mail.gmail.com@localhost>,
Rich Neswold  <rich.neswold%gmail.com@localhost> wrote:
>-=-=-=-=-=-
>
>On Mon, Dec 7, 2015 at 7:03 AM, Christos Zoulas <christos%astron.com@localhost> wrote:
>
>> In article <Pine.NEB.4.64.1512071017540.14191%vps1.whooppee.com@localhost>,
>> Paul Goyette  <paul%whooppee.com@localhost> wrote:
>> >However, looking at the source file for lib/libc/sys/settimeofday.c we
>> >have the following comment which says that we first try the syscall()
>> >and only use the /dev/clockctl mechanism if the syscall() fails:
>>
>> 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)?

I think that it is best to minimize the delay between calling it and setting
the time.

christos



Home | Main Index | Thread Index | Old Index