Version 2 of idle

Updated 2010-05-14 10:18:54 by MGS

MGS [2003/04/04] - I wanted a way to cache idle commands i.e. to be able to schedule the same command multiple times (before the event loop is re-entered), and then have the command run only once. Following Darren New's code snippet, I came up with this simple solution:

proc idle {args} {
  eval after cancel $args
  return eval after idle $args
}

See also: