]> git.uio.no Git - ifi-stolz-refaktor.git/blob - software/no.uio.ifi.refaktor/src/no/uio/ifi/refaktor/analyze/AnalysisStatistics.java
Moving debug statements to SearchBasedExtractAndMoveMethodAnalyzer.
[ifi-stolz-refaktor.git] / software / no.uio.ifi.refaktor / src / no / uio / ifi / refaktor / analyze / AnalysisStatistics.java
1 package no.uio.ifi.refaktor.analyze;
2
3 public class AnalysisStatistics {
4         private int methodCount = 0;
5         private long startTime = 0;
6
7         public void reset() {
8                 methodCount = 0;
9                 startTime = System.currentTimeMillis();
10         }
11
12         public void incrementMethodCount() {
13                 methodCount++;
14         }
15
16         public int getMethodCount() {
17                 return methodCount;
18         }
19
20         public String timeSinceStart() {
21                 long secondsSinceAnalysisStart = secondsSinceStart();
22                 return secondsSinceAnalysisStart/60 + "m" + secondsSinceAnalysisStart % 60 + "s";
23         }
24
25         private long secondsSinceStart() {
26                 return (System.currentTimeMillis() - startTime)/1000;
27         }
28 }