You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by hu...@apache.org on 2019/04/12 16:39:50 UTC

[helix] branch master updated: HELIX-816 use System.currentTimeMillis()

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

hulee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git


The following commit(s) were added to refs/heads/master by this push:
     new efef0db  HELIX-816 use System.currentTimeMillis()
efef0db is described below

commit efef0dbb3e2020546686ca617c03c59330ba9418
Author: bd2019us <bd...@126.com>
AuthorDate: Fri Apr 12 08:39:44 2019 -0500

    HELIX-816 use System.currentTimeMillis()
---
 helix-core/src/main/java/org/apache/helix/messaging/AsyncCallback.java  | 2 +-
 .../apache/helix/messaging/handling/HelixStateTransitionHandler.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/helix-core/src/main/java/org/apache/helix/messaging/AsyncCallback.java b/helix-core/src/main/java/org/apache/helix/messaging/AsyncCallback.java
index e1cdf04..b1a9f8c 100644
--- a/helix-core/src/main/java/org/apache/helix/messaging/AsyncCallback.java
+++ b/helix-core/src/main/java/org/apache/helix/messaging/AsyncCallback.java
@@ -108,7 +108,7 @@ public abstract class AsyncCallback {
   final synchronized void startTimer() {
     if (_timer == null && _timeout > 0) {
       if (_startTimeStamp == 0) {
-        _startTimeStamp = new Date().getTime();
+        _startTimeStamp = System.currentTimeMillis();
       }
       _timer = new Timer(true);
       _timer.schedule(new TimeoutTask(this), _timeout);
diff --git a/helix-core/src/main/java/org/apache/helix/messaging/handling/HelixStateTransitionHandler.java b/helix-core/src/main/java/org/apache/helix/messaging/handling/HelixStateTransitionHandler.java
index 36245de..3b4fa01 100644
--- a/helix-core/src/main/java/org/apache/helix/messaging/handling/HelixStateTransitionHandler.java
+++ b/helix-core/src/main/java/org/apache/helix/messaging/handling/HelixStateTransitionHandler.java
@@ -337,7 +337,7 @@ public class HelixStateTransitionHandler extends MessageHandler {
 
       _statusUpdateUtil.logInfo(message, HelixStateTransitionHandler.class,
           "Message handling task begin execute", manager);
-      message.setExecuteStartTimeStamp(new Date().getTime());
+      message.setExecuteStartTimeStamp(System.currentTimeMillis());
 
       try {
         preHandleMessage();