Package jetbrains.buildServer
Class MockTimeService
- java.lang.Object
-
- jetbrains.buildServer.MockTimeService
-
- All Implemented Interfaces:
DefaultMessagesInfo.MessagesTimeService
,TimeService
public class MockTimeService extends Object implements TimeService, DefaultMessagesInfo.MessagesTimeService
-
-
Field Summary
Fields Modifier and Type Field Description long
myTime
-
Constructor Summary
Constructors Constructor Description MockTimeService()
MockTimeService(long time)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
getNow()
void
inc()
void
inc(long amount, TimeUnit timeUnit)
void
jumpTo(int periodInSeconds)
void
jumpTo(long periodInMilliseconds)
long
now()
Provides current time millis.void
setTime(long currentTimeMillis)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.util.TimeService
nowDate
-
-
-
-
Method Detail
-
now
public long now()
Description copied from interface:TimeService
Provides current time millis.- Specified by:
now
in interfaceTimeService
- Returns:
- current time.
-
getNow
public Date getNow()
- Specified by:
getNow
in interfaceDefaultMessagesInfo.MessagesTimeService
-
inc
public void inc()
-
inc
public void inc(long amount, TimeUnit timeUnit)
-
jumpTo
public void jumpTo(int periodInSeconds)
-
jumpTo
public void jumpTo(long periodInMilliseconds)
-
setTime
public void setTime(long currentTimeMillis)
-
-