We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ed0120 commit 10ac2fdCopy full SHA for 10ac2fd
core/src/main/java/org/elasticsearch/common/util/concurrent/TimedRunnable.java
@@ -79,7 +79,7 @@ long getTotalNanos() {
79
// There must have been an exception thrown, the total time is unknown (-1)
80
return -1;
81
}
82
- return finishTimeNanos - creationTimeNanos;
+ return Math.max(finishTimeNanos - creationTimeNanos, 1);
83
84
85
/**
@@ -91,7 +91,7 @@ long getTotalExecutionNanos() {
91
92
93
94
- return finishTimeNanos - startTimeNanos;
+ return Math.max(finishTimeNanos - startTimeNanos, 1);
95
96
97
0 commit comments