Re: Time difference calculation bug

2023-05-03 Thread Roger Riggs
Hi, The seconds and nano-seconds are computed separately. The representation of Instant holds seconds and nanoseconds separately. The computation is performed on the nano-seconds of the Instant and truncated to milliseconds. The value of 0.000999 becomes 0 when truncated to MILLIS. Regards, R

RE: Time difference calculation bug

2023-05-03 Thread SHARPE, Stuart (Commercial & Institutional CDIO)
} This prints: 994 995 996 997 998 1000 1000 1001 1002 1003 I'm fully prepared to accept that I've missed something, but at the moment I can't understand what that is. Regards, Stuart From: core-libs-dev On Behalf Of Roger Riggs Sent: 03 May 2023 20:58 To: core-libs-dev@open

Re: Time difference calculation bug

2023-05-03 Thread Stephen Colebourne
plusMillis(1); > } > > This prints: > > 994 > 995 > 996 > 997 > 998 > 1000 > 1000 > 1001 > 1002 > 1003 > > I'm fully prepared to accept that I've missed something, but at the moment > I can't understand what that is. > > Rega

Re: Time difference calculation bug

2023-05-04 Thread Roger Riggs
've missed something, but at the moment I can't understand what that is. Regards, Stuart From: core-libs-dev On Behalf Of Roger Riggs Sent: 03 May 2023 20:58 To:core-libs-dev@openjdk.org Subject: Re: Time difference calculation bug Hi, The seconds and nano-seconds are computed s

Re: Time difference calculation bug

2023-05-05 Thread Roger Riggs
epared to accept that I've missed something, but at the moment I can't understand what that is. Regards, Stuart From: core-libs-dev On Behalf Of Roger Riggs Sent: 03 May 2023 20:58 To:core-libs-dev@openjdk.org Subject: Re: Time difference calculation bug Hi, The seconds and n