Hello. Hop mentioned once that it would be useful if someone made a $timerctl() so here goes:
http://maxxx.is-a-geek.org/timerctl.tar.gz Changed files: functions.c and timer.c Usage: $timerctl(EXISTS refnum) - returns 1 if a timer with a specified refnum exists, an empty string otherwise $timerctl(GETTIME refnum) - returns the remaining time (as a float) of the specified timer, an empty string if one doesn't exist $timerctl(SETTIME refnum secs) - sets the specified timer's remaining number of seconds (as a float), and returns the same float on success or an empty string otherwise (ie, when a specified refnum doesn't exist or when you supply a negative secs value) $timerctl(GETEVENTS refnum) - returns the number of times the timer will fire, or an empty string if one doesn't exist $timerctl(SETEVENTS refnum eventcount) - sets the event count, as an integer. Returns the set value or an empty string on failure (refnum invalid or event count less than 1) $timerctl(GETCOMMAND refnum) - returns the command associated with the timer, or an empty string, similarly. $timerctl(SETCOMMAND refnum command) - sets the command for the timer, returning 1 on success or an empty string otherwise. $timerctl(GETREFNUMS) - returns a space-separated list of all valid timer refnums pending. Comments: C beginner warning. Possible sloppy code ahead. Watch out, it's also the first time I've ever submitted something to this list, so please bear with me if I happen not to follow your usual behaviours preferred in here... -- There's always plenty of help when it's not wanted. |\ /| \~~~/ \~~~/ WWW: http://none :( | \/ | /\ > < \~/ > < E-M: maxxx[at]rpg.pl |____| /__\ /___\ /_\ /___\ ICQ: 3146019 _______________________________________________ List mailing list [EMAIL PROTECTED] http://epicsol.org/mailman/listinfo/list