mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-20 02:05:58 +10:00
[유치수] [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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user