Cleanup
This commit is contained in:
@@ -1058,10 +1058,10 @@ double iron_frequency() {
|
|||||||
return 1000000.0;
|
return 1000000.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
iron_ticks_t iron_timestamp() {
|
uint64_t iron_timestamp() {
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
return (iron_ticks_t)(now.tv_sec - start_sec) * 1000000 + (iron_ticks_t)(now.tv_usec);
|
return (uint64_t)(now.tv_sec - start_sec) * 1000000 + (uint64_t)(now.tv_usec);
|
||||||
}
|
}
|
||||||
|
|
||||||
double iron_time() {
|
double iron_time() {
|
||||||
|
|||||||
@@ -661,8 +661,8 @@ double iron_frequency(void) {
|
|||||||
return (double)info.denom / (double)info.numer / 1e-9;
|
return (double)info.denom / (double)info.numer / 1e-9;
|
||||||
}
|
}
|
||||||
|
|
||||||
iron_ticks_t iron_timestamp(void) {
|
uint64_t iron_timestamp(void) {
|
||||||
iron_ticks_t time = mach_absolute_time();
|
uint64_t time = mach_absolute_time();
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1422,18 +1422,17 @@ double iron_frequency(void) {
|
|||||||
|
|
||||||
static struct timeval start;
|
static struct timeval start;
|
||||||
|
|
||||||
iron_ticks_t iron_timestamp(void) {
|
uint64_t iron_timestamp(void) {
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
now.tv_sec -= start.tv_sec;
|
now.tv_sec -= start.tv_sec;
|
||||||
now.tv_usec -= start.tv_usec;
|
now.tv_usec -= start.tv_usec;
|
||||||
return (iron_ticks_t)now.tv_sec * 1000000 + (iron_ticks_t)now.tv_usec;
|
return (uint64_t)now.tv_sec * 1000000 + (uint64_t)now.tv_usec;
|
||||||
}
|
}
|
||||||
|
|
||||||
void iron_init(const char *name, int width, int height, iron_window_options_t *win) {
|
void iron_init(const char *name, int width, int height, iron_window_options_t *win) {
|
||||||
iron_linux_initHIDGamepads();
|
|
||||||
|
|
||||||
gettimeofday(&start, NULL);
|
gettimeofday(&start, NULL);
|
||||||
|
iron_linux_initHIDGamepads();
|
||||||
iron_x11_init();
|
iron_x11_init();
|
||||||
iron_display_init();
|
iron_display_init();
|
||||||
iron_set_app_name(name);
|
iron_set_app_name(name);
|
||||||
|
|||||||
@@ -1052,7 +1052,7 @@ double iron_frequency(void) {
|
|||||||
return (double)info.denom / (double)info.numer / 1e-9;
|
return (double)info.denom / (double)info.numer / 1e-9;
|
||||||
}
|
}
|
||||||
|
|
||||||
iron_ticks_t iron_timestamp(void) {
|
uint64_t iron_timestamp(void) {
|
||||||
return mach_absolute_time();
|
return mach_absolute_time();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,8 +98,8 @@ double iron_frequency(void) {
|
|||||||
return 1000.0;
|
return 1000.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
iron_ticks_t iron_timestamp(void) {
|
uint64_t iron_timestamp(void) {
|
||||||
return (iron_ticks_t)(js_time());
|
return (uint64_t)(js_time());
|
||||||
}
|
}
|
||||||
|
|
||||||
double iron_time(void) {
|
double iron_time(void) {
|
||||||
|
|||||||
@@ -1587,7 +1587,7 @@ double iron_frequency() {
|
|||||||
return (double)frequency.QuadPart;
|
return (double)frequency.QuadPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
iron_ticks_t iron_timestamp(void) {
|
uint64_t iron_timestamp(void) {
|
||||||
LARGE_INTEGER stamp;
|
LARGE_INTEGER stamp;
|
||||||
QueryPerformanceCounter(&stamp);
|
QueryPerformanceCounter(&stamp);
|
||||||
return stamp.QuadPart - startCount.QuadPart;
|
return stamp.QuadPart - startCount.QuadPart;
|
||||||
|
|||||||
@@ -86,10 +86,8 @@ void iron_load_url(const char *url);
|
|||||||
const char *iron_system_id(void);
|
const char *iron_system_id(void);
|
||||||
const char *iron_language(void);
|
const char *iron_language(void);
|
||||||
|
|
||||||
typedef uint64_t iron_ticks_t;
|
|
||||||
|
|
||||||
double iron_frequency(void);
|
double iron_frequency(void);
|
||||||
iron_ticks_t iron_timestamp(void);
|
uint64_t iron_timestamp(void);
|
||||||
int iron_cpu_cores(void);
|
int iron_cpu_cores(void);
|
||||||
int iron_hardware_threads(void);
|
int iron_hardware_threads(void);
|
||||||
double iron_time(void);
|
double iron_time(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user