time method

int time()

Returns the current calendar time as a Unix timestamp (seconds since epoch).

Implementation

int time() {
  return DateTime.now().millisecondsSinceEpoch ~/ 1000;
}