Just for the sake of an alternative, here's the snippet I've been using for a while now:
on *:START:clock
on *:CLOSE:%time:.timerclock off
alias clock { set %time @ $+ $time | .timerclock 0 1 setclock | window -nzk0 %time }
alias setclock { var %t = @ $+ $time | renwin %time %t | set %time %t }
It messes up when you're editing variables in remote though..