millisecondsBetween static method

int millisecondsBetween(
  1. DateTime from,
  2. DateTime to
)

Implementation

static int millisecondsBetween(DateTime from, DateTime to) {
  from = DateTime(
    from.year,
    from.month,
    from.day,
    from.hour,
    from.minute,
    from.second,
    from.millisecond,
    from.microsecond,
  );
  to = DateTime(
    to.year,
    to.month,
    to.day,
    to.hour,
    to.minute,
    to.second,
    to.millisecond,
    to.microsecond,
  );
  return to.difference(from).inMilliseconds;
}