This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new aed2bd1e5ba CAMEL-19734: fixing the elapsed time to message history  
(#12388)
aed2bd1e5ba is described below

commit aed2bd1e5ba2c2d7c0893ce127d4059c966bbaf8
Author: Rhuan Rocha <rhuan...@gmail.com>
AuthorDate: Mon Dec 11 05:51:46 2023 -0300

    CAMEL-19734: fixing the elapsed time to message history  (#12388)
    
    * CAMEL-19734: fixing the elapsed time to message history
    
    Signed-off-by: Rhuan Rocha <rhuan...@gmail.com>
    
    * CAMEL-19734: fixing the elapsed time to message history
    
    Signed-off-by: Rhuan Rocha <rhuan...@gmail.com>
    
    ---------
    
    Signed-off-by: Rhuan Rocha <rhuan...@gmail.com>
---
 .../src/main/java/org/apache/camel/support/MessageHelper.java          | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/core/camel-support/src/main/java/org/apache/camel/support/MessageHelper.java 
b/core/camel-support/src/main/java/org/apache/camel/support/MessageHelper.java
index 35be1579403..7760d70ca8a 100644
--- 
a/core/camel-support/src/main/java/org/apache/camel/support/MessageHelper.java
+++ 
b/core/camel-support/src/main/java/org/apache/camel/support/MessageHelper.java
@@ -42,7 +42,6 @@ import org.apache.camel.spi.ExchangeFormatter;
 import org.apache.camel.spi.HeaderFilterStrategy;
 import org.apache.camel.trait.message.MessageTrait;
 import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.StopWatch;
 import org.apache.camel.util.StringHelper;
 import org.apache.camel.util.URISupport;
 import org.apache.camel.util.json.JsonArray;
@@ -717,7 +716,7 @@ public final class MessageHelper {
             label = "from[" + 
URISupport.sanitizeUri(StringHelper.limitLength(exchange.getFromEndpoint().getEndpointUri(),
 100))
                     + "]";
         }
-        long elapsed = new StopWatch(exchange.getCreated()).taken();
+        long elapsed = System.currentTimeMillis() - exchange.getCreated();
 
         List<MessageHistory> list = 
exchange.getProperty(ExchangePropertyKey.MESSAGE_HISTORY, List.class);
         boolean enabled = list != null;

Reply via email to