[ https://issues.apache.org/jira/browse/STORM-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15137557#comment-15137557 ]
ASF GitHub Bot commented on STORM-1226: --------------------------------------- Github user revans2 commented on a diff in the pull request: https://github.com/apache/storm/pull/1074#discussion_r52215606 --- Diff: storm-core/src/jvm/org/apache/storm/utils/Time.java --- @@ -98,10 +104,25 @@ public static long currentTimeMillis() { return System.currentTimeMillis(); } } - + + public static long toMillis (int secs) { + return 1000*(long) secs; + } + public static long toMillis (String secs) { + return 1000*Long.parseLong(secs); + } + public static int currentTimeSecs() { return (int) (currentTimeMillis() / 1000); } + + public static int delta(int timeInSeconds) { + return Time.currentTimeSecs() - timeInSeconds; + } + + public static long deltaMs(long timeInMilliseconds) { --- End diff -- Most other places in this file uses Millis not Ms, or milliseconds is considered the default. Could we follow and rename this deltaMillis, or rename all of the others to use Ms instead of Millis? > Port backtype.storm.util to java > -------------------------------- > > Key: STORM-1226 > URL: https://issues.apache.org/jira/browse/STORM-1226 > Project: Apache Storm > Issue Type: New Feature > Components: storm-core > Reporter: Robert Joseph Evans > Assignee: Reza Farivar > Labels: java-migration, jstorm-merger > > Port backtype.storm.util from clojure to java. In as many instances as > possible the same interface should be maintained, and calls to clojure > functions in the rest of the code should be replaces with calls to the > corresponding java code. > Some similar functions can be found at > https://github.com/apache/storm/blob/jstorm-import/jstorm-core/src/main/java/com/alibaba/jstorm/utils/JStormUtils.java > Although they are not identical. > For function callbacks we may need to evaluate adding in appropriate callback > interfaces instead. Please try to avoid using clojure internal java classes > unless necessary. -- This message was sent by Atlassian JIRA (v6.3.4#6332)