jetbrains.buildServer.serverSide
Interface TimePoint


public interface TimePoint

Represents a time point with providing the relative time counted from some time base which depends on a particular service producing TimePoint objects (usually the time base is the moment of object creation). The time base can be calculated as follows

TimePoint tp;
Date timeBase = new Date(tp.getAbsoluteTime().getTime()-tp.getRelativeSeconds()*1000)

Author:
Sergey.Anchipolevsky Date: 20.06.2007
See Also:
Date

Field Summary
static TimePoint NEVER
          This constant stands for a special case of timepoint which can never occur.
getRelativeSeconds() returns Long.MAX_VALUE and getAbsoluteTime() returns new Date(Long.MAX_VALUE)
 
Method Summary
 java.util.Date getAbsoluteTime()
          Returns the absolute time of the time point.
 long getRelativeSeconds()
          Returns the number of seconds from the time base.
 

Field Detail

NEVER

static final TimePoint NEVER
This constant stands for a special case of timepoint which can never occur.
getRelativeSeconds() returns Long.MAX_VALUE and getAbsoluteTime() returns new Date(Long.MAX_VALUE)

See Also:
Long
Method Detail

getAbsoluteTime

@NotNull
java.util.Date getAbsoluteTime()
Returns the absolute time of the time point.

Returns:
see above

getRelativeSeconds

long getRelativeSeconds()
Returns the number of seconds from the time base. If the value is negative the time point is prior to the time base.

Returns:
see above