Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // MHTimer.h
- //
- // Created by Michael Helvey on 2/9/16.
- // Copyright © 2016 Michael Helvey. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- @protocol MHTimerDelegate <NSObject>
- /**
- * Notifies delegate of timer change
- *
- * @param timer The MHTimer object
- */
- @optional
- - (void)timerValueUpdatedWithTimer:(id)timer;
- @end
- @interface MHTimer : NSObject
- @property id<MHTimerDelegate> delegate;
- /**
- * The value of the timer, in seconds
- */
- @property NSUInteger value;
- /**
- * Creates a singleton instance of a timer for use throughout an application
- *
- * @return A shared MHTimer instance.
- */
- + (instancetype)sharedTimer;
- /**
- * Starts the timer.
- */
- - (void)start;
- /**
- * Stops the timer.
- */
- - (void)stop;
- /**
- * Resets the value of the timer back to zero.
- */
- - (void)reset;
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement