zone-patch-rxjs-fake-async.js 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * @license
  3. * Copyright Google Inc. All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.io/license
  7. */
  8. (function (global, factory) {
  9. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('rxjs')) :
  10. typeof define === 'function' && define.amd ? define(['rxjs'], factory) :
  11. (factory(global.rxjs));
  12. }(this, (function (rxjs) { 'use strict';
  13. /**
  14. * @license
  15. * Copyright Google Inc. All Rights Reserved.
  16. *
  17. * Use of this source code is governed by an MIT-style license that can be
  18. * found in the LICENSE file at https://angular.io/license
  19. */
  20. Zone.__load_patch('rxjs.Scheduler.now', function (global, Zone, api) {
  21. api.patchMethod(rxjs.Scheduler, 'now', function (delegate) { return function (self, args) {
  22. return Date.now.call(self);
  23. }; });
  24. api.patchMethod(rxjs.asyncScheduler, 'now', function (delegate) { return function (self, args) {
  25. return Date.now.call(self);
  26. }; });
  27. api.patchMethod(rxjs.asapScheduler, 'now', function (delegate) { return function (self, args) {
  28. return Date.now.call(self);
  29. }; });
  30. });
  31. })));