summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-11 16:41:55 +0200
committerNoel Grandin <noel@peralex.com>2014-08-14 10:59:48 +0200
commit63ac956e33a76ee021b22b9b3a7dda838a4cc8c6 (patch)
treebd68b361117d378a419a6d2e8845eaf563128ebe /qadevOOo
parent537ff23149510312e90a0fad866c215b5df9699b (diff)
simplify timing code
Change-Id: I1ecbfc5183261e400349309924dbf059a32cb95f
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/org/openoffice/Runner.java28
1 files changed, 4 insertions, 24 deletions
diff --git a/qadevOOo/runner/org/openoffice/Runner.java b/qadevOOo/runner/org/openoffice/Runner.java
index fe3f1b0ec630..c1c78503194b 100644
--- a/qadevOOo/runner/org/openoffice/Runner.java
+++ b/qadevOOo/runner/org/openoffice/Runner.java
@@ -37,26 +37,6 @@ import base.TestBase;
public class Runner
{
- private static long m_nStartTime;
-
- private static long getRunnerStartTime()
- {
- return m_nStartTime;
- }
-
- /**
- * simple helper functions to start/stop a timer, to know how long a process need in milliseconds
- */
- private static long getTime()
- {
- return System.currentTimeMillis();
- }
-
- private static void setStartTime(long _nStartTime)
- {
- m_nStartTime = _nStartTime;
- }
-
/**
* @return the time, which is done until last startTime()
*/
@@ -67,7 +47,7 @@ public class Runner
System.out.println("Forgotten to initialise a start timer?");
return 0;
}
- long nMeanTime = getTime();
+ long nMeanTime = System.currentTimeMillis();
return nMeanTime - _nCurrentTimer;
}
@@ -180,7 +160,7 @@ public class Runner
{
System.out.println("OOoRunner Main() version from 20101118 (yyyymmdd)");
- setStartTime(getTime());
+ final long nStartTime = System.currentTimeMillis();
DynamicClassLoader dcl = new DynamicClassLoader();
@@ -232,8 +212,8 @@ public class Runner
checkAllVariablesForCygwinPath(param);
boolean worked = toExecute.executeTest(param);
- long nTime = meanTime(getRunnerStartTime());
- String sBeautifyTime = beautifyTime(nTime);
+ final long nTime = System.currentTimeMillis() - nStartTime;
+ final String sBeautifyTime = beautifyTime(nTime);
System.out.println("Job run took: " + nTime + "ms " + " [" + sBeautifyTime + "]");