Assert that time dilation is positive non-zero (#7011)

Q: What happens if we set time dilation to zero?
A: It would be bad.
This commit is contained in:
Chris Bracken
2016-11-23 17:46:05 -08:00
committed by GitHub
parent 3912ecbe12
commit 98da192d60

View File

@@ -23,6 +23,7 @@ double _timeDilation = 1.0;
/// to ensure that time stamps seen by consumers of the scheduler binding are
/// always increasing.
set timeDilation(double value) {
assert(value > 0.0);
if (_timeDilation == value)
return;
// We need to resetEpoch first so that we capture start of the epoch with the