You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
###### SwiftyTimer allows you to instantly schedule delays and repeating timers using convenient closure syntax. It's time to get rid of Objective-C cruft.
@@ -25,12 +25,10 @@ NSTimer.after(1.minute) {
25
25
}
26
26
```
27
27
28
-
SwiftyTimer uses closures instead of target/selector/userInfo.
29
-
30
-
You can specify time intervals with intuitive [Ruby on Rails](http://rubyonrails.org)-like helpers:
28
+
You can specify time intervals with these intuitive helpers:
31
29
32
30
```swift
33
-
100.milliseconds
31
+
100.ms
34
32
1.second
35
33
2.5.seconds
36
34
5.seconds
@@ -45,6 +43,8 @@ You can pass method references instead of closures:
45
43
NSTimer.every(30.seconds, align)
46
44
```
47
45
46
+
### Manual scheduling
47
+
48
48
If you want to make a timer object without scheduling, use `new(after:)` and `new(every:)`:
0 commit comments