mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-20 10:16:13 +10:00
[유치수] [NOBTS] nanotime, currentTimemillis
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@568 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
@@ -13,10 +13,10 @@ public class StopWatch {
|
||||
Map<String, Long> map = local.get();
|
||||
if (map == null) {
|
||||
map = new HashMap<String, Long>(1);
|
||||
map.put(name, System.currentTimeMillis());
|
||||
map.put(name, System.nanoTime());
|
||||
local.set(map);
|
||||
} else {
|
||||
map.put(name, System.currentTimeMillis());
|
||||
map.put(name, System.nanoTime());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class StopWatch {
|
||||
if (map == null) {
|
||||
throw new IllegalStateException("Stopwatch is not started.");
|
||||
} else {
|
||||
return System.currentTimeMillis() - map.get(name);
|
||||
return System.nanoTime() - map.get(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user