public interface IContestClock
Note that under the current implementation, an IContestClock
object is static once it
is obtained; to get a current copy of the contest time information a new IContestClock
object
should be obtained each time.
This documentation describes the current draft of the PC2 API, which is subject to change.
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Check whether this ContestClock object is the same as some other ContestClock.
|
long |
getContestLengthSecs()
Get the contest length.
|
long |
getElapsedSecs()
Get the elapsed seconds in contest.
|
long |
getRemainingSecs()
Get the remaining seconds in the contest.
|
int |
hashCode()
Get the hashcode associated with this ContestClock.
|
boolean |
isContestClockRunning()
Returns a boolean value indicating whether the contest clock is currently running.
|
long getRemainingSecs()
Because of network lag and other factors there will likely be an error in accuracy. For this reason typically the granularity of minutes is used, though seconds is given.
long getElapsedSecs()
Because of network lag and other factors there will likely be an error in accuracy. For this reason typically the granularity of minutes is used, though seconds is given.
long getContestLengthSecs()
The returned value represents the length of time which the Contest Administrator has specified that the contest should run.
boolean isContestClockRunning()
getElapsedSecs()
can be used to determine which case exists (not yet started vs. paused.)boolean equals(Object obj)
Determination of whether two ContestClocks are equal is based on whether they refer to the
same ContestClock as obtained from IContest.getContestClock()
.