https://github.com/remirobert/waitblock
Simple utility for only executing code when you want.
https://github.com/remirobert/waitblock
Last synced: 19 days ago
JSON representation
Simple utility for only executing code when you want.
- Host: GitHub
- URL: https://github.com/remirobert/waitblock
- Owner: remirobert
- License: mit
- Created: 2015-06-10T11:46:35.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-24T13:33:21.000Z (almost 11 years ago)
- Last Synced: 2025-02-13T15:40:33.465Z (over 1 year ago)
- Language: Swift
- Size: 234 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wait🕟Block
  
Simple utility for only executing code when you want.
This will only execute the block passed, if the last time it was called is greater than limit or it has never been called. Keep the last called in memory.
Each block are associated with a name. Wait🕟Block allows you to remove a specific block or clear the list.
```Swift
Wait🕟Block.executeBlock("test", limitTimer: 3) { () -> () in
// Put your fucking code here !!!
}
Wait🕟Block.resetTimer("test")
Wait🕟Block.resetAllTimer()
```
Installation
============
```
use_frameworks!
pod 'WaitBlock'
```