APISonar


io.airlift.stats.TimeStat.time

> io > airlift > stats > TimeStat > time
io APIs airlift APIs stats APIs TimeStat APIs time APIs

Example 1
private final TimeStat time = new TimeStat(MILLISECONDS);

    public <E extends Exception> void wrap(ThrowingRunnable<E> callable)
            throws E
    {
        try (TimeStat.BlockTimer ignored = time.time()) {
            callable.run();
        }
        catch (Exception e) {
            failures.update(1);
            throw e;
        }
    }