Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. //
  2. // MHTimer.h
  3. //
  4. // Created by Michael Helvey on 2/9/16.
  5. // Copyright © 2016 Michael Helvey. All rights reserved.
  6. //
  7.  
  8. #import <Foundation/Foundation.h>
  9.  
  10. @protocol MHTimerDelegate <NSObject>
  11.  
  12. /**
  13. * Notifies delegate of timer change
  14. *
  15. * @param timer The MHTimer object
  16. */
  17. @optional
  18. - (void)timerValueUpdatedWithTimer:(id)timer;
  19.  
  20. @end
  21.  
  22. @interface MHTimer : NSObject
  23.  
  24. @property id<MHTimerDelegate> delegate;
  25.  
  26. /**
  27. * The value of the timer, in seconds
  28. */
  29. @property NSUInteger value;
  30.  
  31. /**
  32. * Creates a singleton instance of a timer for use throughout an application
  33. *
  34. * @return A shared MHTimer instance.
  35. */
  36. + (instancetype)sharedTimer;
  37.  
  38. /**
  39. * Starts the timer.
  40. */
  41. - (void)start;
  42.  
  43. /**
  44. * Stops the timer.
  45. */
  46. - (void)stop;
  47.  
  48. /**
  49. * Resets the value of the timer back to zero.
  50. */
  51. - (void)reset;
  52.  
  53. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement