com.raynigon.ecs.logging.async.service.helper.NoOpTimer Maven / Gradle / Ivy
package com.raynigon.ecs.logging.async.service.helper;
import lombok.SneakyThrows;
import java.util.concurrent.Callable;
import java.util.function.Supplier;
public class NoOpTimer implements TimerWrapper {
@Override
@SneakyThrows
public V recordCallable(Callable callable) {
return callable.call();
}
@Override
public U record(Supplier supplier) {
return supplier.get();
}
@Override
public SampleWrapper start() {
return new NoOpSample();
}
@Override
public long stop(SampleWrapper wrapper) {
return -1;
}
}