public void time(Runnable event) {
        long startTime = this.clock.getTick();
        try {
            event.run();
        } finally {
            update(this.clock.getTick() - startTime);
        }
    }
public void time ( Runnable event ) { long startTime = this . clock . getTick ( ) ; try { event . run ( ) ; } finally { update ( this . clock . getTick ( ) - startTime ) ; } }
Times and records the duration of an event.

@param event a {@link Runnable} whose {@link Runnable#run()} method implements a process
whose duration should be timed