[En-Nut-Discussion] NutGetTickClock rounding (again)

Nathan Moore nategoose at gmail.com
Thu Jul 17 03:51:53 CEST 2008


>
> 2)  Program the timer for 30msec and sleep longer.
>
> It really matters on "coin cell battery" type consumer electronic type
> devices.
>
> This effectively becomes a "tick-less" system.

That's what Linux's dyanaticks system is.  It preforms better and can offer
much better power usage, but does require a much more complex timer ISR to
reschedule for the next event.  Also in order to make NutGetMillis and
NutGetTicks to work right you'd have to do something if, say, there were no
timers set, but a thead running that needed to check the time at several
points.

As far as time units, personally I'd prefer to use macros at the application
level to convert from ms to ticks and back.  I think that most uses would
end up being optimized away because lots of uses are just comparisons to
constants.

Nathan



More information about the En-Nut-Discussion mailing list