UserSpecifiedTimeClock (Hyperic HQ Plugin API)
Keywords: org.hyperic.util.timer.UserSpecifiedTimeClock class

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.util.timer
Class UserSpecifiedTimeClock

    java.lang.Object
      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()`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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