|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Time
Time
- nomen est omen - defines the current time
by providing it in milliseconds.
Time
is used to circumvent the problem that time in
Java is defined by the singleton System
, see
System.currentTimeMillis()
which cannot be
altered (unless you're doing some bytecode manipulation or
aspect black magic). But there's a strong need to manipulate
the current time for unit testing purposes which should
take effect immediately.
Every class that links to eCommon and needs to get the current
time should use currentTimeMillis()
and not
System
's corresponing method.
TimeBuilder
Method Summary | |
---|---|
long |
currentTimeMillis()
Returns the current time in milliseconds. |
Method Detail |
---|
long currentTimeMillis()
Returns the current time in milliseconds.
Subsequent calls to currentTimeMillis()
must not
return values that are smaller then previous ones.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |