badoo / Reaktive

Kotlin multi-platform implementation of Reactive Extensions
Apache License 2.0
1.17k stars 58 forks source link

[2.0] Use Duration in operators (4 of 4) #742

Closed arkivanov closed 1 year ago

arkivanov commented 1 year ago

Converted all operators to use Duration instead of millis.

Also I have checked how RxJava verifies argument preconditions in those operators. It appears that since RxJava schedulers treat negative durations as 0 (we did the same recently), it's allowed to have negative durations in operators. Except the window operator which don't allow zeros, and so requires durations to be positive. I have updated precondition checks in all time-based operators to match RxJava.