currentTime method
Returns the current time in seconds with microseconds precision.
This is compatible with the dt
value used in the update method.
Implementation
double currentTime() {
return DateTime.now().microsecondsSinceEpoch.toDouble() /
Duration.microsecondsPerSecond;
}