A Timer is a metrics type that sends two values:
Suppose:
Then for the first interval:
Therefore:
As a timer reports the total time, a timer may not send any record until the task is complete.
A timer may be calculated at intervals.
Timer timer = Timer
.builder("my.timer")
.description("a description of what this timer does")
.register(registry);
vertx.setPeriodic(1000, l -> {
timer.record(() -> {
// Running here some operation to monitor
});
});