currentTimeStamp method

int currentTimeStamp()

Returns the current timestamp in seconds (integer value).

Implementation

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