CodeBase - Alarm Timers
Return to the CodeBase listing
Category: Core
Version: 1.0
Information
Uploaded: 2nd Jan 2004 18:32
Modified: 1st Jan 1970 01:00
Author: IanM
Summary
Provides up to 64 'alarm' timers (they go off when you specify)
Full Description
Allows up to 64 alarm timers (simple code change to increase this)<br /> <br /> Use CreateAlarm() to create a new alarm (you can set the alarm to repeat too)<br /> Use Alarm() to test the status of the alarm. This function will return a 1 when the alarm has gone off<br /> Use DeleteAlarm() to deactivate an alarm. A non-respawning alarm automatically deletes itself when it has gone off.<br /> <br /> This code will print Hello once per second<br /> <br /> sync on<br /> sync rate 0<br /> <br /> CreateAlarm(1, 1000, 1)<br /> <br /> do<br /> if Alarm(1) then print "Hello"<br /> sync<br /> loop<br />
Comments
No comments yet.