you can make several timers and allow them to count at different rates, just create a different index for each counter, eg:
four_seconds=timer()+4000
one_minute=timer()+60000
two_hours=timer()+7200000
one_minute_fifteen_seconds=timer()+75000
then in the main loop you just keep an eye on the time, eg:
rem these timers fire just once
do
if timer()>=one_minute_fifteen_seconds then print "one minute and fifteen seconds have passed.....times up!!!":one_minute_fifteen_seconds=0
if timer()>=two_hours then play_sunset_sequence():two_hours=0
loop
if you want the timer to start counting again after it has been triggered then just reset the value after you used it, rather than in the last case where we just set them to zero to prevent em being used again, eg:
rem these timers fire repeatedly
do
if timer()>=one_minute_fifteen_seconds then print "one minute and fifteen seconds have passed.....times up!!!":one_minute_and_fifteen_seconds=timer()+75000
if timer()>=two_hours then play_sunset_sequence():two_hours=timer()+7200000
loop
in this case you just set the variables back to the correct offset, and they will start working again and go off after the correct delay, you could also make some thing happen after a random amount of time, eg
startle=timer()+rnd(6000)
do
if timer()>=startle then print "BOO!":startle=timer()+rnd(6000)
loop
or use arrays to store larger amounts of variables, basicaly, you just calculate what value the timer will be at after the desired delay (1000 timer units = 1 second), then check the timer every loop to see if it has passed the desired value, if it has then you do whatever it was you planned and then either discard the timer or reset it to some new value, you don`t get something like the VB.net timer, where it runs in the background and fires when it reaches a value without you having to maintain it, with db you have to handle the timer directly, cheers.
Mentor.
System spec : Pentium 3.0Ghz, 512MB DDR, 2x160Gb HD (using icewave hd coolers ), DVD RW/CD RW (all modes), multimedia front panel, 6 way surround sound, ATI radeon 9800Pro 128mb.