dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28995
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14579: minor fix
------------------------------------------------------------
revno: 14579
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-04-01 11:34:10 +0700
message:
minor fix
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JacksonEventService.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/timer/SystemNanoTimer.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/timer/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-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JacksonEventService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JacksonEventService.java 2014-04-01 04:22:49 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/JacksonEventService.java 2014-04-01 04:34:10 +0000
@@ -129,8 +129,7 @@
notifier.clear( taskId ).notify( taskId, "Importing events" );
- Timer timer = new SystemNanoTimer();
- timer.start();
+ Timer timer = new SystemNanoTimer().start();
try
{
@@ -206,8 +205,7 @@
notifier.clear( taskId ).notify( taskId, "Importing events" );
- Timer timer = new SystemNanoTimer();
- timer.start();
+ Timer timer = new SystemNanoTimer().start();
try
{
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java 2014-04-01 04:34:10 +0000
@@ -117,8 +117,7 @@
log.info( "User '" + username + "' started import at " + new Date() );
notifier.clear( taskId ).notify( taskId, "Importing meta-data" );
- Timer timer = new SystemNanoTimer();
- timer.start();
+ Timer timer = new SystemNanoTimer().start();
ImportSummary importSummary = new ImportSummary();
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/timer/SystemNanoTimer.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/timer/SystemNanoTimer.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/timer/SystemNanoTimer.java 2014-04-01 04:34:10 +0000
@@ -40,15 +40,17 @@
private long _end = 0;
@Override
- public void start()
+ public Timer<Long> start()
{
_start = System.nanoTime();
+ return this;
}
@Override
- public void stop()
+ public Timer<Long> stop()
{
_end = System.nanoTime();
+ return this;
}
@Override
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/timer/Timer.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/timer/Timer.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/timer/Timer.java 2014-04-01 04:34:10 +0000
@@ -35,9 +35,9 @@
*/
public interface Timer<T>
{
- void start();
+ Timer<T> start();
- void stop();
+ Timer<T> stop();
T getDuration();
}