diff options
Diffstat (limited to 'container-search/src/main/java/com/yahoo/vespa/streamingvisitors/tracing/MonotonicNanoClock.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/vespa/streamingvisitors/tracing/MonotonicNanoClock.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/vespa/streamingvisitors/tracing/MonotonicNanoClock.java b/container-search/src/main/java/com/yahoo/vespa/streamingvisitors/tracing/MonotonicNanoClock.java new file mode 100644 index 00000000000..1b3d766e266 --- /dev/null +++ b/container-search/src/main/java/com/yahoo/vespa/streamingvisitors/tracing/MonotonicNanoClock.java @@ -0,0 +1,15 @@ +// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.vespa.streamingvisitors.tracing; + +/* + * Clock which returns a monotonically increasing timestamp from an undefined epoch. + * The epoch is guaranteed to be stable within a single JVM execution, but not across + * processes. Should therefore only be used for relative duration tracking, not absolute + * wall clock time events. + */ +@FunctionalInterface +public interface MonotonicNanoClock { + + long nanoTimeNow(); + +} |