forked from BishopFox/theos-jailed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Prefix.pch
29 lines (25 loc) · 947 Bytes
/
Prefix.pch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#if TARGET_IPHONE || TARGET_IPHONE_SIMULATOR
#import <UIKit/UIKit.h>
#endif
#define CLASS(cls) objc_getClass(#cls)
#ifdef DEBUG
#define __DEBUG__
#endif
#ifdef __DEBUG__
#define CMLog(format, ...) NSLog(@"(%s) in [%s:%d] ::: %@", __PRETTY_FUNCTION__, __FILE__, __LINE__, [NSString stringWithFormat:format, ## __VA_ARGS__])
#define MARK CMLog(@"%s", __PRETTY_FUNCTION__);
#define START_TIMER NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate];
#define END_TIMER(msg) NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; CMLog([NSString stringWithFormat:@"%@ Time = %f", msg, stop-start])
#else
#define CMLog(format, ...)
#define MARK
#define START_TIMER
#define END_TIMER(msg)
//#define NSLog(...)
#endif
#define NB [NSBundle mainBundle]
#define UD [NSUserDefaults standardUserDefaults]
#define FM [NSFileManager defaultManager]
#endif