Code for a stop-watch