Hi, i want to blind time every 4 sec. how do i do it?
bind time -|- {* * * * *} proc_update
i dont how to set second. please help
Code: Select all
proc someproc {} {
#payload here...
#now for the recursive calling:
#First check for existing timers...
if {[lsearch [utimers] "* someproc *"] == -1} {
#No timers left, start a new one
utimer 4 [list someproc]
}
}
someproc
Code: Select all
proc livefeed {} {
set pagina "my url"
set http [http::config -useragent mozilla]
set http [http::geturl $pagina -timeout [expr 1000 * 10]]
set html [http::data $http]
foreach line [split $html "\n"] {
putlog "upgrading livefeed."
if {[lsearch [utimers] "* livefeed *"] == -1} {
#No timers left, start a new one
utimer 5 [list livefeed]
}
}
Code: Select all
proc livefeed {} {
set pagina "my url"
set http [http::config -useragent mozilla]
set http [http::geturl $pagina -timeout [expr 1000 * 10]]
set html [http::data $http]
putlog "upgrading livefeed."
if {[lsearch [utimers] "* livefeed *"] == -1} {
#No timers left, start a new one
utimer 8 [list livefeed]
}
}
livefeed