implementation/src/main/java/io/smallrye/metrics/app/SimpleTimerImpl.java
public <T> T time(Callable<T> event) throws Exception {
        final long startTime = clock.getTick();
        try {
            return event.call();
        } finally {
            update(Duration.ofNanos(clock.getTick() - startTime));
        }
    }
/**
     * Times and records the duration of event.
     *
     * @param event a {@link Callable} whose {@link Callable#call()} method implements a process
     *        whose duration should be timed
     * @param <T> the type of the value returned by {@code event}
     * @return the value returned by {@code event}
     * @throws Exception if {@code event} throws an {@link Exception}
     */
Times and records the duration of event.
@param event a  Callable whose  Callable#call() method implements a process
whose duration should be timed
@param  the type of the value returned by  event
@return the value returned by  event
@throws Exception if  event throws an  Exception
Times and records the duration of event . @param event a Callable whose Callable#call () method implements a process whose duration should be timed @param the type of the value returned by event @return the value returned by event @throws Exception if event throws an Exception
public <T> T time(Callable<T> event) throws Exception {
        final long startTime = clock.getTick();
        try {
            return event.call();
        } finally {
            update(Duration.ofNanos(clock.getTick() - startTime));
        }
    }
public < T > T time ( Callable < T > event ) throws Exception { final long startTime = clock . getTick ( ) ; try { return event . call ( ) ; } finally { update ( Duration . ofNanos ( clock . getTick ( ) - startTime ) ) ; } }
Times and records the duration of event.
Times and records the duration of event .