timer prop?
Rob v.d. berg
Posts: 81
Hello,
I'm new to the propeller,· the last years·I was busy with·the Javelin.··I have an question about time critical actions.
The·Javelin has a Timer class, you can make·several time·critical actions like:····
private static Timer LogTimer······· = new Timer();
·if (LogTimer.timeout(1000)) {
····LogTimer.mark(); ·
···
····'actions every 1000msec·
·}
I'm looking for this in de propeller environment,· can someone push me in the right·direction.
thanks
Rob.···
I'm new to the propeller,· the last years·I was busy with·the Javelin.··I have an question about time critical actions.
The·Javelin has a Timer class, you can make·several time·critical actions like:····
private static Timer LogTimer······· = new Timer();
·if (LogTimer.timeout(1000)) {
····LogTimer.mark(); ·
···
····'actions every 1000msec·
·}
I'm looking for this in de propeller environment,· can someone push me in the right·direction.
thanks
Rob.···
Comments
(normally 80MHz). Programs can read CNT and the WAITCNT instruction (and the WAITCNT statement in Spin) will
pause the processor executing it until CNT is equal to a specified value, then continue. Read the sections in the
Propeller Manual on CNT and WAITCNT for further details.
Normally, if you want several different time-critical events, you use a separate processor for each one with each one
waiting on an appropriate WAITCNT. If you want a large number of timed events, you may need to write your own
scheduler.
Note that WAITCNT waits for a future absolute time (in clock ticks). That makes it easy to accurately time events
to the nearest system clock regardless of the time needed to execute the response to the event.
Post Edited (Mike Green) : 9/8/2008 3:10:25 PM GMT
Thanks for your reaction,·I will start with that.
Rob.
·