-6
override func update(_ currentTime: TimeInterval) {
    // Called before each frame is rendered
    parallax.update(currentTime)
}

How can i control the update to be done once over a specific period of time

JAL
  • 41,701
  • 23
  • 172
  • 300

1 Answers1

0

Your code doesn't add much to your question, so I don't really know if this is what you are looking for, but here is some code to call a function every X time (swift 3):

// call MyMethod every 1 second :
Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(MyController.myMethod), userInfo: nil, repeats: true)

Please search before you post a question -> answer

Community
  • 1
  • 1
Damien
  • 3,322
  • 3
  • 19
  • 29