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

duane ellis ethernut at duaneellis.com
Thu Jul 17 00:41:33 CEST 2008


 >> IMHO we need first is a fix for the problem that fits every need.

That solution is to *NOT* use ticks. But to use milliseconds as your 
time unit. One could keep the existing tick api - by - inside the timer 
functions - converting to mSecs and storing mSecs in the data 
structures. This way - if/when the system speeds up & slows down the 
system can manage the true timing needs.

And - there is another benefit. If the tick rate is 5msec - and there is 
*NOTHING* to do for 30msec - you have 2 options.

1)  Wake up - at the 5msec tick rate. -waste power x5 ticks

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.

However, I think NUT is not that type of system.

-Duane.







More information about the En-Nut-Discussion mailing list