timer.dll 0.3                                         timer.txt


General

Timer is a LiteStep module that gives you the ability to
execute commands after a certain amount of time has elapsed.
Kind of like an egg timer, just that it moves the eggs from the
cooker itself.


Installation

Copy timer.dll to your Litestep directory and add a line like
the following to your step.rc file:

  LoadModule $LitestepDir$timer.dll

After recycling Litestep you will have access to the timers.


Bangs

!TimerStart <name>
Starts a timer

!TimerReset <name>
Restarts the timer, same effect as !TimerKill followed by
!TimerStart thereafter

!TimerStop <name>
Kills the timer and executes the command associated with it

!TimerKill <name>
Kills the timer without executing the command

!TimerStartGroup <group>
Starts all timers in group

!TimerResetGroup <group>
Restarts all timers in group

!TimerStopGroup <group>
Kills all timers in group and executes the commands associated
with them

!TimerKillGroup <group>
Kills all timers in group without executing the commands

!TimerStartAll
Starts all timers

!TimerResetAll
Restarts all timers

!TimerStopAll
Kills all timers and executes the commands associated with them

!TimerKillAll
Kills all timers without executing the commands


RC commands

*Timer name [group] timeout[unit] command

Name is anything you like, as long as it doesn't contain any
spaces. Group is the name of the group, which this time will be
a part of. May be any string without spaces as long as the
first character isn't a digit (0-9). The group is optional.
Timeout is the time that the timer should wait before it
executes the command. The time is in milliseconds (1 second =
1000 ms). By adding a trailing s, m or h to the time you can
change the time unit. s is for seconds, m for minutes and h for
hours. The suffix should follow the time directly without any
space, like 5s or 2m. Command is any valid LiteStep command,
such as a bang or a path. Add a line like this one for each
timer.


Changes

Date         Ver  Changes
09 sep 2001  0.3  Dynamic allocation of memory
                  Unlimited number of timers supported
                  Added timer groups
14 jul 2001  0.2  Added !TimerXXXAll bangs
                  Added timeunit support
                  New version system
07 may 2001  1.0  First public release


To-do-list

 * Visual countdown display
 * Ability to exec commands at a certain date/time
 * Dynamic addition/removal of timers at runtime

If you've got any ideas, feel free send me a mail.


Feedback

If you have a bug report, feature request, or any kind of
feedback, feel free to email it to me at erik@alfafish.com.
For more info and other LiteStep modules and programs, check
out www.alfafish.com


Sourcecode

The sourcecode for this module is distributed under the GNU
Public License. If you didn't get the sourcecode with this
module, you can download it from www.alfafish.com

_______________________________________________________________
Erik Christiansson, aka Sci                   erik@alfafish.com
