← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18962: Timer, added getTimeInS method

 

------------------------------------------------------------
revno: 18962
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-04-21 13:44:27 +0200
message:
  Timer, added getTimeInS method
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/util/Timer.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/util/Timer.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/util/Timer.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/util/Timer.java	2015-04-21 11:44:27 +0000
@@ -70,12 +70,19 @@
         return time;
     }
 
-    public long getMilliSec()
+    public long getTimeInMs()
     {
         long endTime = System.nanoTime();
         long time = ( endTime - startTime ) / 1000000;
         return time;
     }
+
+    public long getTimeInS()
+    {
+        long endTime = System.nanoTime();
+        long time = ( endTime - startTime ) / 1000000000;
+        return time;
+    }
     
     public long getTime( String msg )
     {