| 123456789101112131415161718192021 |
- // LoopFollow
- // Timers.swift
- import Foundation
- import UIKit
- extension MainViewController {
- func startGraphNowTimer(time: TimeInterval = 60) {
- graphNowTimer.invalidate()
- graphNowTimer = Timer.scheduledTimer(timeInterval: time,
- target: self,
- selector: #selector(MainViewController.graphNowTimerDidEnd(_:)),
- userInfo: nil,
- repeats: true)
- }
- @objc func graphNowTimerDidEnd(_: Timer) {
- chartModel.rebuild()
- }
- }
|