basic timer implemented for iOS in Xcode