This is very easy in Tcl.
Define a proc like
proc timer_action {} {
# do the stuff here that needs to be done every 5 seconds
# ...
if {$should_keep_doing_stuff} {
after 5000 timer_action
}
}
To start the thing just use:
after 5000 timer_action
The proc itself will repost the event and so on, until
it decides it should not continue.
CG
Robert Lugg wrote:
> I would like to perform an update every 5 seconds or so.
>
> Right now, I have a <motion> event on the top level monitoring the
> [clock seconds]. This is quite cumbersome and slow. Is there a timer
> like in VB which triggers a function at a given rate? (of course I want
> to use it within vtcl).
>
> Thanks,
>
> Robert
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/vtcl-user