Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Side by Side Diff: sdk/lib/io/timer_impl.dart

Issue 812673009: - Move VM specific helpers to the common dart:io patch file. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/common_patch.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 // Timer heap implemented as a array-based binary heap[0]. 7 // Timer heap implemented as a array-based binary heap[0].
8 // This allows for O(1) `first`, O(log(n)) `remove`/`removeFirst` and O(log(n)) 8 // This allows for O(1) `first`, O(log(n)) `remove`/`removeFirst` and O(log(n))
9 // `add`. 9 // `add`.
10 // 10 //
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 // The Timer factory registered with the dart:async library by the embedder. 404 // The Timer factory registered with the dart:async library by the embedder.
405 static Timer _factory(int milliSeconds, 405 static Timer _factory(int milliSeconds,
406 void callback(Timer timer), 406 void callback(Timer timer),
407 bool repeating) { 407 bool repeating) {
408 if (repeating) { 408 if (repeating) {
409 return new _Timer.periodic(milliSeconds, callback); 409 return new _Timer.periodic(milliSeconds, callback);
410 } 410 }
411 return new _Timer(milliSeconds, callback); 411 return new _Timer(milliSeconds, callback);
412 } 412 }
413 } 413 }
414
415 // Provide a closure which will allocate a Timer object to be able to hook
416 // up the Timer interface in dart:isolate with the implementation here.
417 _getTimerFactoryClosure() {
418 runTimerClosure = _Timer._handleTimeout;
419 return _Timer._factory;
420 }
OLDNEW
« no previous file with comments | « runtime/bin/common_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698