Version 2 of every

Updated 2004-07-26 15:28:40 by RJM

Credit RS with canonicalization of

    proc every {ms body} {eval $body; after $ms [info level 0]}

In the case of a body/script that takes a considerable time fraction of the interval time, the following every is more precise, provided the script under repetitive execution will normally not execute longer than the interval duration:

    proc every {ms body} {after $ms [info level 0]; eval $body}

The after command is set up prior to the script call (RJM).