cowtowncoder/java-uuid-generator

UUIDTimer uses System.currentTimeMillis()

mjburghoffer opened this issue · 3 comments

It would be useful if we could instead pass in an instance of a Clock so unit testing would be easier.

Is Clock included in JDK6?

No it is not.

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.