unit.nanosToUnit
Scales a nanosecond count to unit, exactly (checked).
Division is toward zero, as integer division in D is; a nonzero remainder in either sign refuses.
Parameters
nanos | the value in nanoseconds (signed). |
unit | the unit to express it in. |
Returns
The equivalent count in
Throws
DateTimeException when a sub-unit remainder would be lost - use
nanosToUnitTruncated for explicit loss - or when the result does not fit a signed 64-bit integer.