MaxGekk commented on a change in pull request #23727: [SPARK-26817][CORE] Use 
System.nanoTime to measure time intervals
URL: https://github.com/apache/spark/pull/23727#discussion_r255141503
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/util/Utils.scala
 ##########
 @@ -1005,9 +1005,10 @@ private[spark] object Utils extends Logging {
 
   /**
    * Return the string to tell how long has passed in milliseconds.
+   * @param startTimeNs - a timestamp in nanoseconds returned by 
`System.nanoTime`.
    */
-  def getUsedTimeMs(startTimeMs: Long): String = {
-    " " + (System.currentTimeMillis - startTimeMs) + " ms"
+  def getUsedTimeMs(startTimeNs: Long): String = {
 
 Review comment:
   I kept the "Ms" suffix because the method outputs result string in 
milliseconds. I could rename it to `getUsedTimeNs` but this would look slightly 
inconsistent. The method name indicates "used time in nanoseconds" but actually 
outputs milliseconds.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to