1 #ifndef __RS_TIME_RSH__ 2 #define __RS_TIME_RSH__ 3 4 typedef int rs_time_t; 5 6 typedef struct { 7 int tm_sec; 8 int tm_min; 9 int tm_hour; 10 int tm_mday; 11 int tm_mon; 12 int tm_year; 13 int tm_wday; 14 int tm_yday; 15 int tm_isdst; 16 } rs_tm; 17 18 extern rs_time_t __attribute__((overloadable)) 19 rsTime(rs_time_t *timer); 20 21 extern rs_tm * __attribute__((overloadable)) 22 rsLocaltime(rs_tm *local, const rs_time_t *timer); 23 24 // Return the current system clock in milliseconds 25 extern int64_t __attribute__((overloadable)) 26 rsUptimeMillis(void); 27 28 // Return the current system clock in nanoseconds 29 extern int64_t __attribute__((overloadable)) 30 rsUptimeNanos(void); 31 32 // Return the time in seconds since function was last called in this script. 33 extern float __attribute__((overloadable)) 34 rsGetDt(void); 35 36 #endif 37