#1586 - ENH: Add TimedMetric.addSinceNanos() ... as a helper when using start nanos

This commit is contained in:
rob bygrave
2018-12-21 02:28:23 +13:00
parent 81f42f8e95
commit baa3909c63
6 changed files with 37 additions and 0 deletions
@@ -40,6 +40,11 @@ class DTimedMetric implements TimedMetric {
add((System.nanoTime() - startNanos) / 1000L);
}
@Override
public void addSinceNanos(long startNanos, long beans) {
add((System.nanoTime() - startNanos) / 1000L, beans);
}
/**
* Add a value. Usually the value is Time or Bytes etc.
*/