Class TimeProviderBase
java.lang.Object
com.sportradar.livedata.sdk.common.timer.TimeProviderBase
- Direct Known Subclasses:
- RealTimeTimeProvider,- TimeProvider
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static TimeProviderBaseCurrently usedTimeProviderBaseinstance.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic TimeProviderBaseGets the currently usedTimeProviderBaseinstance.org.joda.time.DateTimeabstract DategetDate()When overridden in derived class, gets theDatespecifying the current date and time.abstract org.joda.time.DateTimeWhen overridden in derived class, gets theDateTimespecifying the current date and time.getFutureDate(long millis) Adds millis to current datestatic voidSets the currently usedTimeProviderBaseto default one which uses system time.static voidsetCurrent(TimeProviderBase provider) Sets the currently usedTimeProviderBaseinstance.
- 
Field Details- 
currentCurrently usedTimeProviderBaseinstance.
 
- 
- 
Constructor Details- 
TimeProviderBasepublic TimeProviderBase()
 
- 
- 
Method Details- 
getCurrentGets the currently usedTimeProviderBaseinstance.- Returns:
- The currently used TimeProviderBaseinstance.
 
- 
getDateTimepublic abstract org.joda.time.DateTime getDateTime()When overridden in derived class, gets theDateTimespecifying the current date and time.- Returns:
- the DateTimespecifying the current date and time.
 
- 
getCurrentTimepublic org.joda.time.DateTime getCurrentTime()
- 
getDateWhen overridden in derived class, gets theDatespecifying the current date and time.- Returns:
- The Datespecifying the current date and time.
 
- 
setCurrentSets the currently usedTimeProviderBaseinstance.- Parameters:
- provider- The- TimeProviderBaseto be used.
- Throws:
- IllegalArgumentException- The- provideris a null reference.
 
- 
resetToRealTimepublic static void resetToRealTime()Sets the currently usedTimeProviderBaseto default one which uses system time.
- 
getFutureDateAdds millis to current date- Parameters:
- millis- milliseconds to add to current date
- Returns:
- The Datespecifying future date and time
 
 
-