aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/vespa/streamingvisitors/tracing/MonotonicNanoClock.java
blob: 65f2d02f90c24da389d6aa3055d48d02b31738e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright Yahoo. 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();

}