| OLD | NEW |
| 1 dart_library.library('dart/core', null, /* Imports */[ | 1 dart_library.library('dart/core', null, /* Imports */[ |
| 2 "dart_runtime/dart" | 2 "dart_runtime/dart" |
| 3 ], /* Lazy imports */[ | 3 ], /* Lazy imports */[ |
| 4 'dart/_js_helper', | 4 'dart/_js_helper', |
| 5 'dart/_internal', | 5 'dart/_internal', |
| 6 'dart/collection', | 6 'dart/collection', |
| 7 'dart/_interceptors', | 7 'dart/_interceptors', |
| 8 'dart/convert' | 8 'dart/convert' |
| 9 ], function(exports, dart, _js_helper, _internal, collection, _interceptors, con
vert) { | 9 ], function(exports, dart, _js_helper, _internal, collection, _interceptors, con
vert) { |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 } | 476 } |
| 477 ['-'](other) { | 477 ['-'](other) { |
| 478 return new Duration._microseconds(dart.notNull(this[_duration]) - dart.not
Null(other[_duration])); | 478 return new Duration._microseconds(dart.notNull(this[_duration]) - dart.not
Null(other[_duration])); |
| 479 } | 479 } |
| 480 ['*'](factor) { | 480 ['*'](factor) { |
| 481 return new Duration._microseconds((dart.notNull(this[_duration]) * dart.no
tNull(factor))[dartx.round]()); | 481 return new Duration._microseconds((dart.notNull(this[_duration]) * dart.no
tNull(factor))[dartx.round]()); |
| 482 } | 482 } |
| 483 ['~/'](quotient) { | 483 ['~/'](quotient) { |
| 484 if (quotient == 0) | 484 if (quotient == 0) |
| 485 dart.throw(new IntegerDivisionByZeroException()); | 485 dart.throw(new IntegerDivisionByZeroException()); |
| 486 return new Duration._microseconds((dart.notNull(this[_duration]) / dart.no
tNull(quotient)).truncate()); | 486 return new Duration._microseconds((dart.notNull(this[_duration]) / dart.no
tNull(quotient))[dartx.truncate]()); |
| 487 } | 487 } |
| 488 ['<'](other) { | 488 ['<'](other) { |
| 489 return dart.notNull(this[_duration]) < dart.notNull(other[_duration]); | 489 return dart.notNull(this[_duration]) < dart.notNull(other[_duration]); |
| 490 } | 490 } |
| 491 ['>'](other) { | 491 ['>'](other) { |
| 492 return dart.notNull(this[_duration]) > dart.notNull(other[_duration]); | 492 return dart.notNull(this[_duration]) > dart.notNull(other[_duration]); |
| 493 } | 493 } |
| 494 ['<='](other) { | 494 ['<='](other) { |
| 495 return dart.notNull(this[_duration]) <= dart.notNull(other[_duration]); | 495 return dart.notNull(this[_duration]) <= dart.notNull(other[_duration]); |
| 496 } | 496 } |
| 497 ['>='](other) { | 497 ['>='](other) { |
| 498 return dart.notNull(this[_duration]) >= dart.notNull(other[_duration]); | 498 return dart.notNull(this[_duration]) >= dart.notNull(other[_duration]); |
| 499 } | 499 } |
| 500 get inDays() { | 500 get inDays() { |
| 501 return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS
_PER_DAY)).truncate(); | 501 return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS
_PER_DAY))[dartx.truncate](); |
| 502 } | 502 } |
| 503 get inHours() { | 503 get inHours() { |
| 504 return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS
_PER_HOUR)).truncate(); | 504 return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS
_PER_HOUR))[dartx.truncate](); |
| 505 } | 505 } |
| 506 get inMinutes() { | 506 get inMinutes() { |
| 507 return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS
_PER_MINUTE)).truncate(); | 507 return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS
_PER_MINUTE))[dartx.truncate](); |
| 508 } | 508 } |
| 509 get inSeconds() { | 509 get inSeconds() { |
| 510 return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS
_PER_SECOND)).truncate(); | 510 return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS
_PER_SECOND))[dartx.truncate](); |
| 511 } | 511 } |
| 512 get inMilliseconds() { | 512 get inMilliseconds() { |
| 513 return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS
_PER_MILLISECOND)).truncate(); | 513 return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS
_PER_MILLISECOND))[dartx.truncate](); |
| 514 } | 514 } |
| 515 get inMicroseconds() { | 515 get inMicroseconds() { |
| 516 return this[_duration]; | 516 return this[_duration]; |
| 517 } | 517 } |
| 518 ['=='](other) { | 518 ['=='](other) { |
| 519 if (!dart.is(other, Duration)) | 519 if (!dart.is(other, Duration)) |
| 520 return false; | 520 return false; |
| 521 return dart.equals(this[_duration], dart.dload(other, _duration)); | 521 return dart.equals(this[_duration], dart.dload(other, _duration)); |
| 522 } | 522 } |
| 523 get hashCode() { | 523 get hashCode() { |
| (...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1597 get elapsedTicks() { | 1597 get elapsedTicks() { |
| 1598 if (this[_start] == null) { | 1598 if (this[_start] == null) { |
| 1599 return 0; | 1599 return 0; |
| 1600 } | 1600 } |
| 1601 return this[_stop] == null ? dart.notNull(Stopwatch._now()) - dart.notNull
(this[_start]) : dart.notNull(this[_stop]) - dart.notNull(this[_start]); | 1601 return this[_stop] == null ? dart.notNull(Stopwatch._now()) - dart.notNull
(this[_start]) : dart.notNull(this[_stop]) - dart.notNull(this[_start]); |
| 1602 } | 1602 } |
| 1603 get elapsed() { | 1603 get elapsed() { |
| 1604 return new Duration({microseconds: this.elapsedMicroseconds}); | 1604 return new Duration({microseconds: this.elapsedMicroseconds}); |
| 1605 } | 1605 } |
| 1606 get elapsedMicroseconds() { | 1606 get elapsedMicroseconds() { |
| 1607 return (dart.notNull(this.elapsedTicks) * 1000000 / dart.notNull(this.freq
uency)).truncate(); | 1607 return (dart.notNull(this.elapsedTicks) * 1000000 / dart.notNull(this.freq
uency))[dartx.truncate](); |
| 1608 } | 1608 } |
| 1609 get elapsedMilliseconds() { | 1609 get elapsedMilliseconds() { |
| 1610 return (dart.notNull(this.elapsedTicks) * 1000 / dart.notNull(this.frequen
cy)).truncate(); | 1610 return (dart.notNull(this.elapsedTicks) * 1000 / dart.notNull(this.frequen
cy))[dartx.truncate](); |
| 1611 } | 1611 } |
| 1612 get isRunning() { | 1612 get isRunning() { |
| 1613 return this[_start] != null && this[_stop] == null; | 1613 return this[_start] != null && this[_stop] == null; |
| 1614 } | 1614 } |
| 1615 static _initTicker() { | 1615 static _initTicker() { |
| 1616 _js_helper.Primitives.initTicker(); | 1616 _js_helper.Primitives.initTicker(); |
| 1617 Stopwatch._frequency = _js_helper.Primitives.timerFrequency; | 1617 Stopwatch._frequency = _js_helper.Primitives.timerFrequency; |
| 1618 } | 1618 } |
| 1619 static _now() { | 1619 static _now() { |
| 1620 return dart.as(dart.dcall(_js_helper.Primitives.timerTicks), int); | 1620 return dart.as(dart.dcall(_js_helper.Primitives.timerTicks), int); |
| (...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3365 exports.StackTrace = StackTrace; | 3365 exports.StackTrace = StackTrace; |
| 3366 exports.Stopwatch = Stopwatch; | 3366 exports.Stopwatch = Stopwatch; |
| 3367 exports.String = String; | 3367 exports.String = String; |
| 3368 exports.RuneIterator = RuneIterator; | 3368 exports.RuneIterator = RuneIterator; |
| 3369 exports.StringBuffer = StringBuffer; | 3369 exports.StringBuffer = StringBuffer; |
| 3370 exports.StringSink = StringSink; | 3370 exports.StringSink = StringSink; |
| 3371 exports.Symbol = Symbol; | 3371 exports.Symbol = Symbol; |
| 3372 exports.Type = Type; | 3372 exports.Type = Type; |
| 3373 exports.Uri = Uri; | 3373 exports.Uri = Uri; |
| 3374 }); | 3374 }); |
| OLD | NEW |