Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.util.timer
Class UserSpecifiedTimeClock

java.lang.Object
  extended by org.hyperic.util.timer.UserSpecifiedTimeClock
All Implemented Interfaces:
Clock

public class UserSpecifiedTimeClock
extends java.lang.Object
implements Clock

A clock that returns the value set by the user. This implementation is particularly useful for unit testing frameworks.


Constructor Summary
UserSpecifiedTimeClock()
          Creates an instance that defaults to the current system time.
 
Method Summary
 long currentTimeMillis()
           
 void setCurrentTime(long currentTimeMillis)
          Set the current time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserSpecifiedTimeClock

public UserSpecifiedTimeClock()
Creates an instance that defaults to the current system time.

Method Detail

setCurrentTime

public void setCurrentTime(long currentTimeMillis)
Set the current time.

Parameters:
currentTimeMillis - The current time in milliseconds.

currentTimeMillis

public long currentTimeMillis()
Specified by:
currentTimeMillis in interface Clock
Returns:
The current time in milliseconds.
See Also:
Clock.currentTimeMillis()

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.