
On Tue, 2008-09-02 at 19:10 +0200, Henning Rogge wrote:
> On Tue, Sep 2, 2008 at 17:00, Bernd Petrovitsch <bernd@firmix.at> wrote:
> > ACK.
> > Unless the uses of tms_buf or olsr_scheduler_sleep() are somewhat
> > strange .....
> 
> Isn't there a better timesource for linux that does not need this workaround ?

Not really:
gettimeofday(2) and time(2) return the current date+time (read: that
what the device thinks it is) or some representation of it.
The problem with that is that it is not continuous because
ntp/ntpdate/rdate/the admin/daylight-saving-time/... may change speed
and value at any time (and I purposely ignore leap seconds).
These values are great for syslog and other time values which refer to
the rest of the planet.

For timeouts in select/poll/sleep/timers in general one wants a steady
clock without jumps. And times(2) is the only portable sys-call I know
of.
BTW do we have requirements on precision?

> Maybe we could put a "olsr_time()" function into the machine specific
> parts that results a sane and exact clock ?

Better is at least "olsr_times()" to not confuse it with time(2).

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




