This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 2774e64ba4 Fix back-port. setStartTime(long) should not be a NO-OP.
2774e64ba4 is described below
commit 2774e64ba4479143c1aa2fae4681471e6b40bcad
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Sep 22 21:11:27 2025 +0100
Fix back-port. setStartTime(long) should not be a NO-OP.
---
java/org/apache/coyote/Request.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/java/org/apache/coyote/Request.java
b/java/org/apache/coyote/Request.java
index 5123e783dd..cb593ed9f6 100644
--- a/java/org/apache/coyote/Request.java
+++ b/java/org/apache/coyote/Request.java
@@ -727,17 +727,19 @@ public final class Request {
return System.currentTimeMillis() -
TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startTimeNanos);
}
+ public long getStartTimeNanos() {
+ return startTimeNanos;
+ }
+
/**
* @param startTime time
*
- * @deprecated This setter will be removed in Tomcat 11
+ * @deprecated This setter will be removed in Tomcat 11. Use {@link
#markStartTime()}.
*/
@Deprecated
public void setStartTime(long startTime) {
- }
-
- public long getStartTimeNanos() {
- return startTimeNanos;
+ startTimeNanos = System.nanoTime() +
TimeUnit.MILLISECONDS.toNanos(startTime - System.currentTimeMillis());
+ startInstant = Instant.now();
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]