Skip to content

Commit 9ffd288

Browse files
Merge pull request #308 from NorthNick/master
Ensure now() is always updated in TestScheduler.advanceTo/By
2 parents b16d261 + 95efbff commit 9ffd288

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rxjava-core/src/main/java/rx/concurrency/TestScheduler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ private void triggerActions(long targetTimeInNanos) {
8080
while (!queue.isEmpty()) {
8181
TimedAction<?> current = queue.peek();
8282
if (current.time > targetTimeInNanos) {
83-
time = targetTimeInNanos;
8483
break;
8584
}
8685
time = current.time;
8786
queue.remove();
8887
// because the queue can have wildcards we have to ignore the type T for the state
8988
((Func2<Scheduler, Object, Subscription>) current.action).call(current.scheduler, current.state);
9089
}
90+
time = targetTimeInNanos;
9191
}
9292

9393
@Override

0 commit comments

Comments
 (0)