|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IContestClock
This interface describes the PC2 API view of Contest Time information. It provides methods for accessing various time-related aspects of the contest, including how much time has elapsed, how much time remains, and how long the contest is scheduled to last.
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.
Method Summary | |
---|---|
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. |
Method Detail |
---|
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()
.
equals
in class Object
obj
- the ContestClock which is to be compared with this ContestClock for equality.
int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |