Frameworks for writing profilers, stopwatches, ... [Mark G. Saye] has one [http://www.speakeasy.org/~msaye/tcl/timer/].