If you really only need a 1 second interval, you should not store the delta for each frame. Just save the start time and calculate the elapsed time for each frame. When the elapsed time exceeds your 1 second interval, you reset the start time to the present.
override func update(_ currentTime: CFTimeInterval) { let elpasedTimeSinceLastupdate = currentTime - startTime //Check if enough time has elapsed otherwise there is nothing to do guard elpasedTimeSinceLastupdate > requiredTimeIntervale else { return } startTime = currentTime // Do stuff here }
Ideally, you need more than 1 timer, so you will need to maintain an array of timers and a table of intervals and blocks for the call. It starts to get very complicated, and in fact, you should probably use the built-in Timer block in iOS 10, which is much more straight forward:
_ = Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { _ in
source share