title: Combine RxSwift timer and interval observables into a single observable with completion
body: <p>I'd like to create an observable that behaves behaves something like this.</p>
  
  <pre><code>var count = 0
  
  func setupCountdownTimer() {
    let rx_countdownTimer = CountdownTimer.observable(5)
  
    rx_countdownTimer &gt;- subscribeNext {
      secondsRemaining in
      println(secondsRemaining) // prints 5, then 4, 3, 2, 1, then finally 0
      count = secondsRemaining
    }
  
    rx_countdownTimer &gt;- subscribeCompleted {
      println(count) // prints 5, assuming countdownTimer stopped 'naturally'
    }
  }
  
  @IBAction func stop(sender: UIButton) {
    rx_countdownTimer.sendCompleted() // Causes 2nd println above to output, say, 3, if that's how many seconds had elapsed thus far.
  }
  </code></pre>
  
  <p>It seems like I should be able to somehow combine a <a href="http://reactivex.io/documentation/operators/timer.html" rel="nofollow">timer observable</a> and an <a href="http://reactivex.io/documentation/operators/interval.html" rel="nofollow">interval observable</a> here, but I can't seem to figure out the correct strategy for doing this. New to Rx, so I'm open to the possibility that I'm going about it all wrong. ¯\_(ツ)_/¯</p>