Skip to content
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

[Request] Periodic closure execution #11

Closed
kirilltitov opened this issue Aug 9, 2017 · 3 comments
Closed

[Request] Periodic closure execution #11

kirilltitov opened this issue Aug 9, 2017 · 3 comments

Comments

@kirilltitov
Copy link

Like setInterval in JavaScript. This would be extremely handy in some cases (in my particular case I use this for server logic). The syntax could be smth like this:

every(.seconds(5), dispatchLevel: .userInteractive) { /* closure body */ }

(this is done, ofc, with DispatchSource.makeTimerSource.scheduleRepeating)

@Jeehut
Copy link
Member

Jeehut commented Aug 10, 2017

Sure, sounds good. Would you like to do a PR?

kirilltitov pushed a commit to kirilltitov/HandySwift that referenced this issue Aug 11, 2017
@kirilltitov
Copy link
Author

Sneaky :) But I don't mind, there you go.

@Jeehut
Copy link
Member

Jeehut commented Apr 5, 2019

Closing this due to inactivity in #12.

@Jeehut Jeehut closed this as completed Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants