nanosFromUnit

fnlong nanosFromUnit(long count, TemporalUnit unit) @safe pure

Scales an integer count in unit to nanoseconds, exactly.

Parameters

countthe value in unit (signed).
unitthe unit the count is expressed in.

Returns

The equivalent nanosecond count.

Throws

DateTimeException when the exact result does not fit a signed

64-bit integer - overflow rejects in either direction, never wraps (the positive and negative bounds differ by one and are each honoured).