Switch scheduler over to Duration

This patch prepares us to switch to using integers when handing off the
animation time from the engine to the framework.
This commit is contained in:
Adam Barth
2015-10-03 10:55:25 -07:00
parent 472c440396
commit db191e96bd
8 changed files with 28 additions and 27 deletions

View File

@@ -8,18 +8,18 @@ void main() {
bool firstCallbackRan = false;
bool secondCallbackRan = false;
void firstCallback(double timeStamp) {
void firstCallback(Duration timeStamp) {
expect(firstCallbackRan, isFalse);
expect(secondCallbackRan, isFalse);
expect(timeStamp, equals(16.0));
expect(timeStamp.inMilliseconds, equals(16));
firstCallbackRan = true;
scheduler.cancelAnimationFrame(secondId);
}
void secondCallback(double timeStamp) {
void secondCallback(Duration timeStamp) {
expect(firstCallbackRan, isTrue);
expect(secondCallbackRan, isFalse);
expect(timeStamp, equals(16.0));
expect(timeStamp.inMilliseconds, equals(16));
secondCallbackRan = true;
}