https://github.com/rnapier/rncoalesce
Coalescing timer
https://github.com/rnapier/rncoalesce
Last synced: 4 months ago
JSON representation
Coalescing timer
- Host: GitHub
- URL: https://github.com/rnapier/rncoalesce
- Owner: rnapier
- Created: 2015-01-28T16:14:48.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-28T16:22:11.000Z (over 10 years ago)
- Last Synced: 2025-01-11T07:47:47.900Z (4 months ago)
- Language: Objective-C
- Homepage: http://stackoverflow.com/questions/28183169/coalesce-or-otherwise-fire-methods-every-so-often
- Size: 141 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Configure this object by providing it a block and a timeout. Once you
call `fireWhenExpired`, the object is "armed." As long as you keep
calling `fireWhenExpired` before the timeout, it will keep delaying.
When the timer expires, it will execute the block.
After firing, it will not fire again until `fireWhenExpired` is called,
and the timer expires.
While this object is armed, it self-retains until it fires. So if you
release this object, and it would otherwise be deallocated, it will
still perform the block after the timeout and then deallocate.