waitNextMillis static method

int waitNextMillis(
  1. int lastTimestamp
)

Implementation

static int waitNextMillis(int lastTimestamp) {
  int timestamp = DateTime.now().millisecondsSinceEpoch;
  while (timestamp <= lastTimestamp) {
    timestamp = DateTime.now().millisecondsSinceEpoch;
  }
  return timestamp;
}