Version 0 of bgsleep

Updated 2008-03-09 19:10:49 by RoyKeene

proc bgsleep {delay} {

    set final_time [expr ([clock seconds] * 1.0) + (($delay * 1.0) / 1000.0)]

    set activation_var [join [list BGSLEEP WAIT FOR $final_time [expr rand()]] _]
    global $activation_var

    after $delay [list set $activation_var 1]
    vwait $activation_var

}


enter categories here