session-ios/Signal/src/profiling/EventWindow.h

15 lines
440 B
Objective-C

#import <Foundation/Foundation.h>
#import "PriorityQueue.h"
@interface EventWindow : NSObject {
@private NSTimeInterval windowDuration;
@private PriorityQueue* events;
@private NSTimeInterval lastWindowEnding;
}
+(EventWindow*) eventWindowWithWindowDuration:(NSTimeInterval)windowDuration;
-(void) addEventAtTime:(NSTimeInterval)eventTime;
-(NSUInteger) countAfterRemovingEventsBeforeWindowEndingAt:(NSTimeInterval)endOfWindowTime;
@end