I have this code set up in a subclass of an Operation in Swift. But I can't figure out why the timer is only calling the selector once.
class DogOperationRun : DogOperation {
let thisDog:Dog?
let operationID:Int?
var runDistance:Double?
var dogSpeed:Double?
var runTimeLeft:Double = 0.0
var currentRunDistance:Double = 0.0
private var interval = 0.0
private var cycle = 0.0
private var dogTimer:Timer?
init(thisDog:Dog, operationID:Int, runDistance:Double, dogSpeed:Double) {
    self.thisDog = thisDog
    self.operationID = operationID
    self.runDistance = runDistance
    self.dogSpeed = dogSpeed
    super.init(self.operationID!)
}
override func main() {
    guard isCancelled == false else {
        operationIsFinished = true
        return
    }
    startRun()
}
func startRun() {
    operationIsExecuting = true
    if let distance = runDistance, let thisDogSpeed = dogSpeed {
        runTimeLeft = distance
        interval = distance/thisDogSpeed
        dogTimer = Timer.scheduledTimer(timeInterval: 0.5, target: self, selector: #selector(runDog), userInfo: nil, repeats: true)
    }
}
@objc func runDog() {
    runTimeLeft -= interval
    cycle += 1
    if runTimeLeft > 0 {
        runDistance = interval * cycle
        print("\(self.thisDog!.name) has run \(runDistance!) meters!")
    } else {
        dogTimer?.invalidate()
        operationIsFinished = true
    }
}
}
and the superclass
import Foundation
class DogOperation: Operation {
public var id:Int
//going to over ride the existing variable and return my private one
override var isExecuting: Bool {
    return operationIsExecuting
}
var operationIsExecuting = false {
    didSet {
        willChangeValue(forKey: "isExecuting")
        print("Operation \(id) will execute")
        didChangeValue(forKey: "isExecuting")
        print("Operation \(id) is executing")
    }
}
override var isFinished: Bool {
    return operationIsFinished
}
var operationIsFinished = false {
    didSet {
        willChangeValue(forKey: "isFinished")
        print("Operation \(id) will finish")
        didChangeValue(forKey: "isFinished")
        print("Operation \(id) is finished")
    }
}
init(_ id:Int) {
    self.id = id
}
}
calling it like so:
let lodiDogRun = DogOperationRun(thisDog: aDog, operationID: 1, runDistance: 100.0, dogSpeed: 12.0)
    let pretzelDogRun = DogOperationRun(thisDog: nextDog, operationID: 2, runDistance: 100.0, dogSpeed: 14.0)
    myOperationQueue.addOperations([lodiDogRun, pretzelDogRun], waitUntilFinished: true)
Edit for Matt:The only time dogRun gets called is when I force the timer with dogTimer.fire(). For the instance I captured it on it was running on thread 5:

