-
-
Notifications
You must be signed in to change notification settings - Fork 1
Timer Start Up
Alina P edited this page Nov 30, 2024
·
5 revisions
Tutaj, aby utrzymać się w tym samym miejscu (…), trzeba biec, ile sił
You can start the timer anytime and from anywhere in your code. There are several methods available to help you with that.
Important
Timer can be run backwards - use any to
value that is greater than from
.
-
func start(from startTime: MTime = .zero, to endTime: MTime = .max) throws
- Starts the timer using the specified initial values.
- Allows to set-up time in a user friendly way
-
func start(from startTime: MTime = .zero, to endTime: MTime = .max) throws
- Starts the timer using the specified initial values.
-
func start() throws
- Starts up going infinity timer
func startTimer() throws {
let timeFrom = MTime(timeInterval: 1)
let timeTo = MTime(minutes: 2, seconds: 14, milliseconds: 5)
try MTimer(.id).start(from: timeFrom, to: timeTo)
}
func startTimer() throws {
try MTimer(.id).start(from: .zero, to: 10)
}
func startTimer() throws {
try MTimer(.id).start()
}
func startTimer() throws {
try MTimer(.id).start(from: 10, to: .zero)
}