time_machine icon indicating copy to clipboard operation
time_machine copied to clipboard

NanosecondTime not exposed

Open degloff opened this issue 4 years ago • 1 comments

NanosecondTime is not exposed.

 Instant.epochTime(NanosecondTime(nanosecAsInt))

Is more descriptive than

Instant.fromEpochBigIntNanoseconds(BigInt.from(nanosecAsInt))

We can still keep current time in long 64 bit as for the next appox 260 years. After that I don't care anymore :)

degloff avatar Mar 20 '20 21:03 degloff

May I also suggest to change the naming

factory Instant.fromEpochNanoseconds(int nanoseconds) => Instant.epochTime(ITime.trusted(0, nanoseconds));

Here fromEpochNanoseconds may be misleading, what about fromEpochNanosecondsInterval?

degloff avatar Mar 20 '20 21:03 degloff