blob: f1abed6308e42709f893b82629effa9b5ecb203a [file] [log] [blame]
Stephen Hinesca3f09c2011-01-07 15:11:30 -08001#ifndef __RS_TIME_RSH__
2#define __RS_TIME_RSH__
3
4typedef int rs_time_t;
5
6typedef 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
18extern rs_time_t __attribute__((overloadable))
19 rsTime(rs_time_t *timer);
20
21extern rs_tm * __attribute__((overloadable))
22 rsLocaltime(rs_tm *local, const rs_time_t *timer);
23
24// Return the current system clock in milliseconds
25extern int64_t __attribute__((overloadable))
26 rsUptimeMillis(void);
27
28// Return the current system clock in nanoseconds
29extern int64_t __attribute__((overloadable))
30 rsUptimeNanos(void);
31
32// Return the time in seconds since function was last called in this script.
33extern float __attribute__((overloadable))
34 rsGetDt(void);
35
36#endif