Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
TimeFactory |
|
| 2.0;2 |
1 | package net.sf.jperfprobe; | |
2 | ||
3 | 0 | public class TimeFactory { |
4 | public static Time getTime() { | |
5 | Time retTime; | |
6 | 2485 | String version = System.getProperty("java.version"); |
7 | 2485 | char minor = version.charAt(2); |
8 | 2485 | if (minor < '5') { |
9 | 1 | retTime = new SystemTimeByMillis(); |
10 | } else { | |
11 | 2484 | retTime = new SystemTimeByNanos(); |
12 | } | |
13 | ||
14 | 2485 | return retTime; |
15 | } | |
16 | } |