project_files/HedgewarsMobile/Hedgewars_Prefix.pch
changeset 3663 8c28abf427f5
parent 3513 f589230fa21b
child 3701 8c449776ebe6
--- a/project_files/HedgewarsMobile/Hedgewars_Prefix.pch	Thu Jul 22 03:08:17 2010 +0200
+++ b/project_files/HedgewarsMobile/Hedgewars_Prefix.pch	Thu Jul 22 12:47:32 2010 +0200
@@ -22,6 +22,13 @@
  
 #define ZAssert(condition, ...) do { if (!(condition)) { ALog(__VA_ARGS__); }} while(0)
 
+// by http://blog.coriolis.ch/2009/01/05/macros-for-xcode/
+#define START_TIMER NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate];
+#define END_TIMER(msg) 	NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; CMLog([NSString stringWithFormat:@"%@ Time = %f", msg, stop-start]);
+
+#define releaseAndNil(x) [x release], x = nil;
+
+
 #if !__IPHONE_3_2
 typedef enum {
     UIUserInterfaceIdiomPhone,           // iPhone and iPod touch style UI