Comcast / jrugged

A Java libary of robustness design patterns
Apache License 2.0
265 stars 93 forks source link

Should SystemClock be used internally? #35

Open vladdu opened 9 years ago

vladdu commented 9 years ago

Should all the uses of System.currentTimeMillis be replaced with SystemClock.currentTimeMillis? I would suppose the meaning of SystemClock is to allow tests to mock it up and simulate slow services and the like.

Of course, this would mean to allow each of the affected classes to receive a Clock as parameter. If not, the SystemClock is used.

fxsweety commented 5 years ago

@hdzh and @fxsweety are working on this issue