diff options
author | Roman Shevchenko <roman.shevchenko@jetbrains.com> | 2014-08-28 20:31:35 +0400 |
---|---|---|
committer | Roman Shevchenko <roman.shevchenko@jetbrains.com> | 2014-08-28 20:31:35 +0400 |
commit | 270a3f6e22782278a5254c4c073cad2ad8b6ccf8 (patch) | |
tree | 55ea555868fdab92eff97395d36aa83599f0cf39 /timer/com/vladium/utils/timing/JavaSystemTimer.java | |
parent | b3705cf40072203386d784c161419cbcc9e9d164 (diff) | |
download | fernflower-270a3f6e22782278a5254c4c073cad2ad8b6ccf8.tar fernflower-270a3f6e22782278a5254c4c073cad2ad8b6ccf8.tar.gz fernflower-270a3f6e22782278a5254c4c073cad2ad8b6ccf8.tar.lz fernflower-270a3f6e22782278a5254c4c073cad2ad8b6ccf8.tar.xz fernflower-270a3f6e22782278a5254c4c073cad2ad8b6ccf8.zip |
java-decompiler: post-import cleanup (unneeded files dropped)
Diffstat (limited to 'timer/com/vladium/utils/timing/JavaSystemTimer.java')
-rw-r--r-- | timer/com/vladium/utils/timing/JavaSystemTimer.java | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/timer/com/vladium/utils/timing/JavaSystemTimer.java b/timer/com/vladium/utils/timing/JavaSystemTimer.java deleted file mode 100644 index e3f3b48..0000000 --- a/timer/com/vladium/utils/timing/JavaSystemTimer.java +++ /dev/null @@ -1,74 +0,0 @@ - -package com.vladium.utils.timing; - -// ---------------------------------------------------------------------------- -/** - * A package-private implementation of {@link ITimer} based around Java system - * timer [<code>System.currentTimeMillis()</code> method]. It is used when - * <code>HRTimer</code> implementation is unavailable.<P> - * - * {@link TimerFactory} acts as the Factory for this class.<P> - * - * MT-safety: an instance of this class is safe to be used within the same - * thread only. - * - * @author (C) <a href="mailto:vroubtsov@illinoisalumni.org">Vlad Roubtsov</a>, 2002 - */ -final class JavaSystemTimer implements ITimer, ITimerConstants -{ - // public: ................................................................ - - public void start () - { - if (DO_STATE_CHECKS) - { - if (m_state != STATE_READY) - throw new IllegalStateException (this + ": start() must be called from READY state, current state is " + STATE_NAMES [m_state]); - } - - if (DO_STATE_CHECKS) m_state = STATE_STARTED; - m_data = System.currentTimeMillis (); - } - - public void stop () - { - // latch stop time in a local var before doing anything else: - final long data = System.currentTimeMillis (); - - if (DO_STATE_CHECKS) - { - if (m_state != STATE_STARTED) - throw new IllegalStateException (this + ": stop() must be called from STARTED state, current state is " + STATE_NAMES [m_state]); - } - - m_data = data - m_data; - if (DO_STATE_CHECKS) m_state = STATE_STOPPED; - } - - public double getDuration () - { - if (DO_STATE_CHECKS) - { - if (m_state != STATE_STOPPED) - throw new IllegalStateException (this + ": getDuration() must be called from STOPPED state, current state is " + STATE_NAMES [m_state]); - } - - return m_data; - } - - public void reset () - { - if (DO_STATE_CHECKS) m_state = STATE_READY; - } - - // protected: ............................................................. - - // package: ............................................................... - - // private: ............................................................... - - private int m_state; // used to keep track of timer state - private long m_data; // timing data - -} // end of class -// ---------------------------------------------------------------------------- |