public interface Chronograph
Modifier and Type | Method and Description |
---|---|
RelativeTime |
getEpochOffset()
Determines the time on the UTC clock when this chronograph was
zero.
|
RelativeTime |
getEpochOffset(RelativeTime dest)
Determines the difference between the epoch of this clock from the Epoch.
|
default RelativeTime |
getQueryPrecision()
Obtain the precision with which time can be read, i.e., the nominal
interval between ticks.
|
RelativeTime |
getQueryPrecision(RelativeTime dest)
Obtain the precision with which time can be read, i.e., the nominal
interval between ticks.
|
AbsoluteTime |
getTime()
Determines the current time.
|
AbsoluteTime |
getTime(AbsoluteTime dest)
Obtain the current time.
|
default boolean |
isUpdated()
Determine whether or not this time keeper is asynchronously synchronized
with an external time source.
|
default AbsoluteTime |
lastSynchronized()
Determine the last time this chronograph was synchronized.
|
default AbsoluteTime |
lastSynchronized(AbsoluteTime result)
Determine the last time this chronograph was synchronized with an external
time source.
|
RelativeTime getEpochOffset() throws UnsupportedOperationException, UninitializedStateException
UnsupportedOperationException
- when the chronograph does not have
the concept of date.UninitializedStateException
- when UTC time is not yet available.RelativeTime
object in the current
execution context with the realtime clock as its chronograph
and containing time when this chronograph was zero.RelativeTime getEpochOffset(RelativeTime dest) throws StaticUnsupportedOperationException, UninitializedStateException
RelativeTime
value equal to
zero. For other clocks, it is a value representing the difference between
zero on that clock and zero on the UTC measured on the UTC.StaticUnsupportedOperationException
- when the chronograph
does not have the concept of date.UninitializedStateException
- when UTC time is not yet available.dest
- An instance of RelativeTime
object
which will be updated in place.RelativeTime
passed as parameter,
or a new object when dest
is null
. The returned
object represents the time differnce between its associated
chronograph and the Epoch.AbsoluteTime getTime()
AbsoluteTime
in the
current allocation context, representing the current time.
The returned object has this
its chronograph.AbsoluteTime getTime(AbsoluteTime dest)
AbsoluteTime
is changed at some time between the invocation of the
method and the return of the method. This method will return an absolute
time value that represents this chronograph's notion of the absolute time.
For chronographs that do not measure calendar time, this absolute time may
not represent a wall clock time.dest
- The instance of AbsoluteTime
object which will be
updated in place.AbsoluteTime
passed as parameter, or a new
object when dest
is null
. The returned object
represents the current time and is associated with this
chronograph.default RelativeTime getQueryPrecision()
getQueryPrecision(RelativeTime)
with null
as an argument.RelativeTime getQueryPrecision(RelativeTime dest)
dest
- is a time object in which to return the results.dest
, when dest
is not
null
, or in a newly created object otherwise.default boolean isUpdated()
true
for chronographs that are synchronized and
false
otherwise.default AbsoluteTime lastSynchronized() throws StaticUnsupportedOperationException
lastSynchronized(AbsoluteTime)
with
null
as an argument.StaticUnsupportedOperationException
- when the chronograph
will never be updated, i.e., is never synchronized with an
external time source.default AbsoluteTime lastSynchronized(AbsoluteTime result) throws StaticUnsupportedOperationException
StaticUnsupportedOperationException
- when the chronograph
will never be updated, i.e., is never synchronized with an
external time source.result
- a time object to hold the result.result
is null
, a newly allocated time value
holding the value corresponding to the last synchronized time;
otherwise result
updated with that current value.aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2025 aicas GmbH. All Rights Reserved.