Timestamp.fromMillisecondsSinceEpoch constructor
Timestamp.fromMillisecondsSinceEpoch(
- int milliseconds
Create a Timestamp fromMillisecondsSinceEpoch
Implementation
factory Timestamp.fromMillisecondsSinceEpoch(int milliseconds) {
int seconds = (milliseconds / _kThousand).floor();
final int nanoseconds = (milliseconds - seconds * _kThousand) * _kMillion;
return Timestamp(seconds, nanoseconds);
}