Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit 27a1316

Browse files
Merge pull request #836 from katzoo/virtualtimescheduler-typos
fixed code typos in VirtualTimeScheduler docs
2 parents a2633f3 + d2ccd72 commit 27a1316

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

doc/api/schedulers/virtualtimescheduler.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,13 @@ var scheduler = new MyVirtualScheduler(
255255
0 /* initial time */
256256
);
257257

258-
scheduler.scheduleAbsoluteWithState('world', 100, function (x) {
259-
console.log('hello ' + x);
258+
scheduler.scheduleAbsoluteWithState('world', 100, function (scheduler, state) {
259+
console.log('hello ' + state);
260260
});
261261

262-
scheduler.scheduleAbsoluteWithState(200, function () {
263-
console.log('goodnight ' + x);
264-
}, 'moon');
262+
scheduler.scheduleAbsoluteWithState('moon', 200, function (scheduler, state) {
263+
console.log('goodnight ' + state);
264+
});
265265

266266
scheduler.start();
267267
// => hello world
@@ -336,12 +336,12 @@ var scheduler = new MyVirtualScheduler(
336336
0 /* initial time */
337337
);
338338

339-
scheduler.scheduleRelativeWithState('world', 100, function (x) {
340-
console.log('hello ' + x);
339+
scheduler.scheduleRelativeWithState('world', 100, function (scheduler, state) {
340+
console.log('hello ' + state);
341341
});
342342

343-
scheduler.scheduleRelativeWithState('moon', 200, function () {
344-
console.log('goodnight ' + x);
343+
scheduler.scheduleRelativeWithState('moon', 200, function (scheduler, state) {
344+
console.log('goodnight ' + state);
345345
});
346346

347347
scheduler.start();
@@ -395,12 +395,12 @@ var scheduler = new MyVirtualScheduler(
395395
0 /* initial time */
396396
);
397397

398-
scheduler.scheduleRelativeWithState('world', 100, function (x) {
399-
console.log('hello ' + x);
398+
scheduler.scheduleRelativeWithState('world', 100, function (scheduler, state) {
399+
console.log('hello ' + state);
400400
});
401401

402-
scheduler.scheduleRelativeWithState('moon', 200, function () {
403-
console.log('goodnight ' + x);
402+
scheduler.scheduleRelativeWithState('moon', 200, function (scheduler, state) {
403+
console.log('goodnight ' + state);
404404
});
405405

406406
scheduler.start();

0 commit comments

Comments
 (0)