Clock provides an efficient mechanism for obtaining the current time and date.
See: Description
Class Summary | |
---|---|
Clock | Provides an efficient mechanism for obtaining the current system time. |
DaemonMaster | The daemon master is responsible for starting, terminating and restarting daemon thread. |
UUID | Universally Unique Identifier (UUID) generator. |
UUID.InvalidIDException | An exception indicating the identifier is invalid and cannot be converted into an array of bytes. |
Clock provides an efficient mechanism for obtaining the current
time and date. Uses a background thread to automatically increment an internal clock and
periodically synchronize with the system clock. The method clock
is more efficient than java.lang.System#currentTimeMillis currentTimeMillis
and also allows the clock to be artificially advanced for testing purposes.
UUID is a Universally Unique Identifier (UUID) generator. A UUID is an identifier that is unique across both space and time, with respect to the space of all UUIDs. A UUID can be used for objects with an extremely short lifetime, and to reliably identifying very persistent objects across a network. UUIDs are 128 bit values and encoded into 36 characters.
This generator produces time-based UUIDs based on the varient specified in an IETF draft from February 4, 1998. Identifiers can be created in string form with and without a prefix, and as byte arrays. Convenience methods are also provided for converting an identifier to and from an array of bytes.