-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fire 2 time in each repeat #34
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use the below code for print date and time every 2 second. but Repeat run inside code 2 time in each fire.
private var timer: Repeater?
self.timer = Repeater.every(.seconds(2)) { _ in
print("App from \(from) => \(String(self.gf.getCurrentDateTime()))")
}
Result in console is here:
App from vcChatMain => 20181130135222
App from vcChatMain => 20181130135222
App from vcChatMain => 20181130135224
App from vcChatMain => 20181130135224
App from vcChatMain => 20181130135226
App from vcChatMain => 20181130135226
App from vcChatMain => 20181130135228
App from vcChatMain => 20181130135228
As you see, every 2 second,
print
method fire 2 time. Why this problem occurred?The text was updated successfully, but these errors were encountered: