27.07.2011, 08:05
This include made it even harder I think :P - I won't explain anything because it's happened enough already.
By the way, I prefer Y_Less' one.
Code:
#define seconds(%0) (1000 * %0) #define minutes(%0) (1000 * 60 * %0) #define hours(%0) (1000 * 60 * 60 * %0) SetTimer("AnyFunction", 500, false); //Half second SetTimer("AnyFunction", seconds(5), false); //5 seconds SetTimer("AnyFunction", minutes(5), false); //5 minutes SetTimer("AnyFunction", hours(1), false); //1 hour
Code:
SetTimer("AnyFunction", 500 MILLISECONDS, false); //Half second SetTimer("AnyFunction", 5 SECONDS), false); //5 seconds SetTimer("AnyFunction", 5 MINUTES, false); //5 minutes SetTimer("AnyFunction", 1 HOUR, false); //1 hour