[유치수] [NOBTS] refactor

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@582 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Chisu Yu
2012-09-05 07:59:34 +00:00
parent beb607891e
commit aa91ad015f
3 changed files with 36 additions and 12 deletions
+10 -2
View File
@@ -35,8 +35,16 @@ public class StopWatch {
// TODO application 에러로 전달되는경우가 있어서 일단 0으로
return -1;
} else {
if (map.containsKey(id)) {
return System.nanoTime() - map.get(id);
Long startTime = map.get(id);
map.remove(id);
// TODO: if using thread pool, this is unnecessary.
// if (map.size() == 0) {
// local.remove();
// }
if (startTime != null) {
return System.nanoTime() - startTime;
} else {
return -1;
}