01: /*
02: * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.monitoring.utilities;
06:
07: public class ActivityTime {
08: private final ThreadLocal time = new ThreadLocal();
09:
10: public final void mark() {
11: time.set(new Long(System.currentTimeMillis()));
12: }
13:
14: public final long measure() {
15: return System.currentTimeMillis()
16: - ((Long) time.get()).longValue();
17: }
18: }
|