This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Timer

Help for those learning Tcl or writing their own scripts.
Post Reply
V
VJain
Voice
Posts: 4
Joined: Mon Jan 18, 2010 9:47 pm

Timer

Post by VJain »

Hi,

I'm kind of new to TCL and i have a question (I tried searching and nothing came up on the first few pages... sorry, I didn't want to read through 40 pages of threads).

Code: Select all

proc timer {min args} { 
 if {[scan $min %d] % 1 == 0} { 
  thr
 } 
}
I want to change the timer so it goes every 30 seconds and not every minute. I'm not too sure how to do it since I got this snipping from online.

Thanks,
~VJ
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Use [utimer] instead of [timer] ([utimer] is a timer in seconds, read tcl-commands.doc about its usage).
V
VJain
Voice
Posts: 4
Joined: Mon Jan 18, 2010 9:47 pm

Post by VJain »

Great, thanks!
~VJ
Post Reply