Skip to content

Commit

Permalink
Force timer context stop in MultiTimer (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
Honza Strnad authored Jul 26, 2019
1 parent 13686c8 commit 0b5cc21
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ public void stop() {

@Override
public long stopAndGetTime() {
return contexts.stream().map(TimeContext::stopAndGetTime).findFirst().get();
long result = contexts.get(0).stopAndGetTime();
contexts.stream().skip(1).forEach(TimeContext::stop);
return result;
}

}
Expand Down

0 comments on commit 0b5cc21

Please sign in to comment.