On 23 February 2015 at 22:27, Peter Levart <peter.lev...@gmail.com> wrote:
> What about the following idea:
>
> - create a (maybe still package-private) instance method
> ZoneId.getSystemClock() and cache the per-ZoneId Clock instance inside the
> ZoneId.
> - Clock.system(ZoneId) static method is then just delegating to
> ZoneId.getSystemClock().
> - Similarly Clock.systemDefaultZone() can just return
> ZoneId.defaultSystem().getSystemClock().
> - Similarly Clock.systemUTC() can just return
> ZoneOffset.UTC.getSystemClock().
>
> Or do we just want to cache systemUTC() Clock here?

I suspect that the above would be a good optimisation, though perhaps
a separate issue?

Stephen

Reply via email to