You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/12/18 17:02:27 UTC
(camel) 02/03: CAMEL-20225: deprecate ad-hoc elapsed time calculations
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 935ed455c71766d0ff0b623249f41f66d82afdf4
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Dec 15 12:07:21 2023 -0300
CAMEL-20225: deprecate ad-hoc elapsed time calculations
---
core/camel-util/src/main/java/org/apache/camel/util/TimeUtils.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/core/camel-util/src/main/java/org/apache/camel/util/TimeUtils.java b/core/camel-util/src/main/java/org/apache/camel/util/TimeUtils.java
index 835c1b9c446..d689b8c5434 100644
--- a/core/camel-util/src/main/java/org/apache/camel/util/TimeUtils.java
+++ b/core/camel-util/src/main/java/org/apache/camel/util/TimeUtils.java
@@ -254,9 +254,11 @@ public final class TimeUtils {
/**
* Elapsed time using milliseconds since epoch.
*
- * @param start the timestamp in milliseconds since epoch
- * @return the elapsed time in milliseconds
+ * @param start the timestamp in milliseconds since epoch
+ * @return the elapsed time in milliseconds
+ * @deprecated Use the Clock API when possible
*/
+ @Deprecated(since = "4.4.0")
public static long elapsedMillisSince(long start) {
return System.currentTimeMillis() - start;
}