MCPcopy Create free account
hub / github.com/antlr/codebuff / initNanoTime

Method initNanoTime

output/java_guava/1.4.19/Monitor.java:984–991  ·  view source on GitHub ↗

Returns System.nanoTime() unless the timeout has already elapsed. Returns 0L if and only if the timeout has already elapsed.

(long timeoutNanos)

Source from the content-addressed store, hash-verified

982 */
983
984 private static long initNanoTime(long timeoutNanos) {
985 if (timeoutNanos <= 0L) {
986 return 0L;
987 } else {
988 long startTime = System.nanoTime();
989 return (startTime == 0L) ? 1L : startTime;
990 }
991 }
992
993 /**
994 * Returns the remaining nanos until the given timeout, or 0L if the timeout has already elapsed.

Callers 3

enterWhenMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected