getDelta method
Get the seconds passed since the time oldTime was set and sets oldTime to the current time.
If autoStart is true
and the clock is not running, also starts
the clock.
Implementation
double getDelta() {
double diff = 0;
if (autoStart && !running) {
start();
return 0;
}
if (running) {
final newTime = now();
diff = (newTime - oldTime) / 1000;
oldTime = newTime;
fps = (diff*3600).toInt();
elapsedTime += diff;
}
return diff;
}