UUIDTimer uses System.currentTimeMillis()
mjburghoffer opened this issue · 3 comments
mjburghoffer commented
It would be useful if we could instead pass in an instance of a Clock
so unit testing would be easier.
cowtowncoder commented
Is Clock
included in JDK6?
mjburghoffer commented
No it is not.
cowtowncoder commented
My main concern is just that JUG only requires JDK6. Looks like Clock
was added for Java 8.
Otherwise I don't have objections (esp. for adding convenience alternatives). Maybe it'd be possible to add a non-JDK interface of clock object to pass instead if the goal is unit testing. PRs welcome.