2014 snapchat source code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
741 B

  1. //
  2. // SCTimedTask.m
  3. // Snapchat
  4. //
  5. // Created by Michel Loenngren on 4/2/17.
  6. // Copyright © 2017 Snapchat, Inc. All rights reserved.
  7. //
  8. #import "SCTimedTask.h"
  9. #import <SCFoundation/NSString+SCFormat.h>
  10. @implementation SCTimedTask
  11. - (instancetype)initWithTargetTime:(CMTime)targetTime
  12. task:
  13. (void (^)(CMTime relativePresentationTime, CGFloat sessionStartTimeDelayInSecond))task
  14. {
  15. if (self = [super init]) {
  16. _targetTime = targetTime;
  17. _task = task;
  18. }
  19. return self;
  20. }
  21. - (NSString *)description
  22. {
  23. return [NSString
  24. sc_stringWithFormat:@"<%@: %p, targetTime: %lld>", NSStringFromClass([self class]), self, _targetTime.value];
  25. }
  26. @end