Evaluated proc chatrate ltime { set c 0; set min [- [clock seconds] $ltime]; foreach line [lreverse [log]] { set t [first $line]; if {$t > $min} { incr c } }; expr $c*1.000/$ltime }