Skip to content

Commit

Permalink
Fix Interval argument name from 'timeout' or 'interval'
Browse files Browse the repository at this point in the history
  • Loading branch information
jochasinga committed Mar 18, 2017
1 parent 13d511c commit 0892a68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions observable/observable.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func Empty() Observable {

// Interval creates an Observable emitting incremental integers infinitely between
// each given time interval.
func Interval(term chan struct{}, timeout time.Duration) Observable {
func Interval(term chan struct{}, interval time.Duration) Observable {
source := make(chan interface{})
go func(term chan struct{}) {
i := 0
Expand All @@ -268,7 +268,7 @@ func Interval(term chan struct{}, timeout time.Duration) Observable {
select {
case <-term:
break OuterLoop
case <-time.After(timeout):
case <-time.After(interval):
source <- i
}
i++
Expand Down

0 comments on commit 0892a68

Please sign in to comment.