mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.3 KiB
Objective-C
39 lines
1.3 KiB
Objective-C
#import <Foundation/Foundation.h>
|
|
#import "CollapsingFutures.h"
|
|
#import "Operation.h"
|
|
#import "Terminable.h"
|
|
|
|
@interface TimeUtil : NSObject
|
|
|
|
+ (NSTimeInterval)time;
|
|
|
|
/// Result has type Future(TypeOfValueReturnedByFunction)
|
|
+ (TOCFuture *)scheduleEvaluate:(Function)function
|
|
afterDelay:(NSTimeInterval)delay
|
|
onRunLoop:(NSRunLoop *)runLoop
|
|
unlessCancelled:(TOCCancelToken *)unlessCancelledToken;
|
|
|
|
/// Result has type Future(TypeOfValueReturnedByFunction)
|
|
+ (TOCFuture *)scheduleEvaluate:(Function)function
|
|
at:(NSDate *)date
|
|
onRunLoop:(NSRunLoop *)runLoop
|
|
unlessCancelled:(TOCCancelToken *)unlessCancelledToken;
|
|
|
|
+ (void)scheduleRun:(Action)action
|
|
afterDelay:(NSTimeInterval)delay
|
|
onRunLoop:(NSRunLoop *)runLoop
|
|
unlessCancelled:(TOCCancelToken *)unlessCancelledToken;
|
|
|
|
+ (void)scheduleRun:(Action)action
|
|
at:(NSDate *)date
|
|
onRunLoop:(NSRunLoop *)runLoop
|
|
unlessCancelled:(TOCCancelToken *)unlessCancelledToken;
|
|
|
|
+ (void)scheduleRun:(Action)action
|
|
periodically:(NSTimeInterval)interval
|
|
onRunLoop:(NSRunLoop *)runLoop
|
|
untilCancelled:(TOCCancelToken *)untilCancelledToken
|
|
andRunImmediately:(BOOL)shouldRunImmediately;
|
|
|
|
@end
|