|
Relates :
|
With the increased resolution brought up by JDK-8068730, it would feel more natural to add a new java.time.Clock.tickMillis(ZoneId zone) method to java.time.Clock - which would return a clock with only milliseconds resolution.
Quoting from Stephen Colebourne:
<<
I do believe that this change means that a new method should be added
to Clock however:
public static Clock tickMillis(ZoneId zone) {
return new TickClock(system(zone), NANOS_PER_MILLI);
}
While this can be achieved without a new method, the API would feel
slightly strange without it now better-than-milli clocks exist. I
recommend raising a separate RFE to track this.
>>