Re: Microsecond support in java.time.Duration/Instant?

2018-01-23 Thread Alan Eliasen
I'm not sure I want to bring this into the discussion, but there's a proposal (pushed largely by Facebook) for a timescale called the "flick" which is exactly 1/70560 second. Quote: "This unit of time is the smallest time unit which is LARGER than a nanosecond, and can in integer quant

Re: Microsecond support in java.time.Duration/Instant?

2018-01-23 Thread Roger Riggs
Hi Kurt, I created an enhancement request in the Jira and linked the core-libs emails in.     https://bugs.openjdk.java.net/browse/JDK-8196003 Thanks for the frequency usage info.  Its hard to guess whether if micro APIs were available whether they would have been used instead of millis. Ro

Re: Microsecond support in java.time.Duration/Instant?

2018-01-22 Thread Stephen Colebourne
On 22 January 2018 at 02:58, Kurt Alfred Kluever wrote: > I'm curious how these sets of units were chosen or decided upon? I > understand that the line must be drawn somewhere (or else someone may come > along asking for centisecond support), but I'm curious as to the rational. Nanos have to be s

Re: Microsecond support in java.time.Duration/Instant?

2018-01-22 Thread Roger Riggs
Hi Kurt, In JSR 310, the thinking was that higher precision was desirable and that adding micros methods just bulked up the API without sufficient payback. At the time there were insufficient use cases to motivate the addition.  If the use is more common than previously thought it is a straig

Microsecond support in java.time.Duration/Instant?

2018-01-21 Thread Kurt Alfred Kluever
Hi core-libs-dev, At Google, we often use microsecond precision for instants/durations (probably because of historical reasons). Therefore, we have a handful of static utility functions for creating/converting java.time types and microseconds: public static Duration ofMicros(long micros) publ