clock function

int clock(
  1. List args
)

Provides a clock() function that returns the current time in milliseconds since the epoch.

void -> int

Example

var start = clock();
// do some stuff...
var end = clock();
var duration = end - start;
print("Elapsed: $duration ms.");

Implementation

int clock(List args) => DateTime.now().millisecondsSinceEpoch;