Posted to tcl by kbk at Sun Apr 01 01:15:00 GMT 2012view raw

  1. proc something {} {
  2. variable tooSoon
  3. if {[info exists tooSoon]} {
  4. return
  5. }
  6. set tooSoon [after 5000 cleanup]
  7. # ... do something ...
  8. }
  9. proc cleanup {} {
  10. variable tooSoon
  11. unset tooSoon
  12. }