1st: Don't mix timer and utimer..
2nd: "info exists timer" only checks wether the variable named "timer" exists or not. It does no check whatsoever wether the name within "timer" actually points to a valid timer or utimer.
As for the post made by "user", it depends on the proc preceding the example you posted, and expects the globalspace variable "timer" to hold the name of a speciffic timer. It also assumes that the code triggered by the timer will unset that very same variable.
3rd: In order to check wether a (u)timer actually exists, search the list generated by "timers" (or "utimers") for the existance of the actual timer. The link posted by Alchera illustrates how this is done.
4th: When creating a (u)timer, do it something like this:
Code: Select all
utimer 4 [list array unset g_linesperhost *$l_uhost*$l_chan*]
This way you don't have to worry about "special" characters and such. In case you wish to keep track of the timer-id, do something like this:
Code: Select all
set myvar [utimer 4 [list array unset g_linesperhost *$l_uhost*$l_chan*]]