porting text editor
This commit is contained in:
@@ -25,11 +25,11 @@ fn os_date_t os_universal_time(void) {
|
||||
return result;
|
||||
}
|
||||
|
||||
fn u64 os_get_microseconds(void) {
|
||||
fn f64 os_microseconds(void) {
|
||||
struct timespec t;
|
||||
clock_gettime(CLOCK_MONOTONIC, &t);
|
||||
u64 result = t.tv_sec*million(1) + (t.tv_nsec/thousand(1));
|
||||
return result;
|
||||
return (f64)result;
|
||||
}
|
||||
|
||||
fn f64 os_get_milliseconds(void) {
|
||||
|
||||
Reference in New Issue
Block a user