Miroslav Lichvar wrote:
Why not degrade the resolution of the clock directly in ntp sources?

Good idea.

In get_systime():
        GET_SYSTIME_AS_TIMESPEC(&ts);
        ts.tv_nsec /= 1000000;
        ts.tv_nsec *= 1000000;


Ouch!

I'd far prefer a simple mask, getting rid of the bottom N bits: About 20-50 times faster...

Terje

--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

_______________________________________________
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions

Reply via email to