Time.bigIntNanoseconds constructor
Time.bigIntNanoseconds(
- BigInt bigNanoseconds
Implementation
factory Time.bigIntNanoseconds(BigInt bigNanoseconds) {
// todo: this clamps -- should we test for overflow?
var milliseconds = (bigNanoseconds ~/ TimeConstants.nanosecondsPerMillisecondBigInt).toInt();
var nanoseconds = bigArithmeticMod(bigNanoseconds, TimeConstants.nanosecondsPerMillisecondBigInt).toInt();
return Time._untrusted(milliseconds, nanoseconds);
}