nanosToUnitTruncated

fnlong nanosToUnitTruncated(long nanos, TemporalUnit unit) @safe pure nothrow @nogc

Scales a nanosecond count to unit, truncating a sub-unit remainder toward zero (explicit precision loss).

Parameters

nanosthe value in nanoseconds (signed).
unitthe unit to express it in.

Returns

The truncated count in unit. Every nanosecond count fits every

unit (division only shrinks), so this never overflows.