title: How to set due time in timer(_:period:scheduler:)
body: <p>I have learned RxSwift for a period of time by following the book named Reactive Programming with swift. There are some tutorials about timer operator that I cannot understand</p>
  
  <pre><code>let elementsPerSecond = 1
  let delayInSeconds = 2
  let sourceObservable = PublishSubject&lt;Int&gt;()
  
  var current = 1
  let timer = DispatchSource.timer(interval: 1.0 / Double(elementsPerSecond), queue: .main) {
      sourceObservable.onNext(current)
      sourceObservable2.onNext(current)
      current = current + 1
  }
  
  _ = sourceObservable.subscribe(sourceTimeline)
  
  _ = sourceObservable
  .delay(RxTimeInterval(delayInSeconds), scheduler: MainScheduler.instance)
  .subscribe(delayedTimeline)
  
  _ = Observable&lt;Int&gt;
  .timer(RxTimeInterval(0), scheduler: MainScheduler.instance)
  .flatMap { _  in
      return sourceObservable.delay(RxTimeInterval(delayInSeconds), scheduler: MainScheduler.instance)
  }
  .subscribe(timerTimeline)
  </code></pre>
  
  <p>But the result is very strange:
  <a href="https://i.stack.imgur.com/ctnsP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ctnsP.png" alt="enter image description here"></a></p>
  
  <p>The third view is timerTimeline and it was second behind second timeline which is delayedTimeline. So where is the second goes? What's more, the first element was ignored by the timerTimeline. I don't know how to use the timer operator and could anyone tell me the reason, thanks.</p>