Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. var dataValues : [String:Any]?
  2.  
  3. override func viewDidLoad() {
  4. super.viewDidLoad()
  5.  
  6. dataValues = Calculations.shared.ecefToData()
  7.  
  8. var timer = Timer()
  9. timer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector:#selector(self.tick) , userInfo: nil, repeats: true)
  10. }
  11. var currentTime: String = "00:00:00"
  12. @objc func tick() -> String {
  13. currentTime = DateFormatter.localizedString(from: Date(),
  14. dateStyle: .short,
  15. timeStyle: .medium)
  16. return currentTime
  17. print(currentTime)
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement