timer.dll 0.5                                         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

!TimerAdd name [group] timeout[unit] command
Dynamicly adds a timer, same syntax as the *Timer lines

!TimerUpdate name [group] timeout[unit] command
Updates a timer with new setting, anything but the name can be
changed

!TimerRemove name
Removes a timer

!TimerRemoveGroup group
Removes all timer in a group

!TimerRemoveAll
Removes all timers

!TimerStatus
Displays a list of all timers and their status


RC commands

*Timer name [#flags] [group] timeout[unit] command

  Name is anything you like, as long as it doesn't contain any
spaces.
  Flags is a combination of s and/or l prepended with a #. If
the s flag is specified the timer will be started when the
module is loaded/refreshed. If the l flag is specified the
timer will automagicly restart after the command is executed.
It will continue in a loop until you kill/stop it.
  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
21 oct 2001  0.5    Added !Refresh support
                    Support for looping timers
                    Support for autostarting timers
                    Source code restructured and cleaned up
                    The source now comes in a separete zip file
22 sep 2001  0.4.1  Memory cleanup bug fixed
                    Revision ID bug fixed
18 sep 2001  0.4    Runtime addition/update/removal of timers
                    Timer status display
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

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
