diff options
author | eea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-24 23:11:49 +0000 |
---|---|---|
committer | eea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-24 23:11:49 +0000 |
commit | 358dc412371b0a8658af2e0bbdea43a8e138c063 (patch) | |
tree | 53a3cfccfc1b63f10ccd818b8da5c5741fdad191 /java | |
parent | ad242612b13512bef34dce62f6259b5df33d4067 (diff) | |
download | ATCD-358dc412371b0a8658af2e0bbdea43a8e138c063.tar.gz |
Updated source files for Timers.
Diffstat (limited to 'java')
-rw-r--r-- | java/JACE/Timers/ProfileTimer.java | 46 | ||||
-rw-r--r-- | java/JACE/Timers/package.html | 8 |
2 files changed, 54 insertions, 0 deletions
diff --git a/java/JACE/Timers/ProfileTimer.java b/java/JACE/Timers/ProfileTimer.java new file mode 100644 index 00000000000..210d8887907 --- /dev/null +++ b/java/JACE/Timers/ProfileTimer.java @@ -0,0 +1,46 @@ +/************************************************* + * + * = PACKAGE + * JACE.Timers + * + * = FILENAME + * ProfileTimer.java + * + *@author Prashant Jain + * + *************************************************/ +package JACE.Timers; + +/** + * A Java wrapper for interval timers. + */ +public class ProfileTimer +{ + /** + * Start the timer. + */ + public void start () + { + this.startTime_ = java.lang.System.currentTimeMillis (); + } + + /** + * Stop the timer. + */ + public void stop () + { + this.stopTime_ = java.lang.System.currentTimeMillis (); + } + + /** + * Determine elapsed time between start and stop. + *@return Total elapsed time (stop - start). + */ + public long elapsedTime () + { + return this.stopTime_ - this.startTime_; + } + + private long startTime_; + private long stopTime_; +} diff --git a/java/JACE/Timers/package.html b/java/JACE/Timers/package.html new file mode 100644 index 00000000000..4aa67ec1fd6 --- /dev/null +++ b/java/JACE/Timers/package.html @@ -0,0 +1,8 @@ +<!-- $Id$ --> +<HTML> +<BODY> +Time related classes. + +@see JACE.ASX.TimeValue +</BODY> +</HTML> |