NewsBlur-viq/clients/ios/Other Sources/JNWThrottledBlock.h
2017-09-26 10:48:02 -07:00

12 lines
493 B
Objective-C
Executable file

#import <Foundation/Foundation.h>
@interface JNWThrottledBlock : NSObject
// Runs the block after the buffer time _only_ if another call with the same identifier is not received
// within the buffer time. If a new call is received within that time period the buffer will be reset.
// The block will be run on the main queue.
//
// Identifier and block must not be nil.
+ (void)runBlock:(void (^)(void))block withIdentifier:(NSString *)identifier throttle:(CFTimeInterval)bufferTime;
@end