diff --git a/time/time_lin.v b/time/time_lin.v index 2c18cfc381..e3291c26dd 100644 --- a/time/time_lin.v +++ b/time/time_lin.v @@ -5,15 +5,15 @@ module time // in ms -fn ticks() f64 { +pub fn ticks() f64 { return f64(0) } -fn sleep(seconds int) { +pub fn sleep(seconds int) { C.sleep(seconds) } -fn sleep_ms(seconds int) { +pub fn sleep_ms(seconds int) { C.usleep(seconds * 1000) } diff --git a/time/time_mac.v b/time/time_mac.v index f7e1a4c189..77efba9663 100644 --- a/time/time_mac.v +++ b/time/time_mac.v @@ -9,7 +9,7 @@ module time //#include // in ms -fn ticks() f64 { +pub fn ticks() f64 { panic('not implemented') /* t := i64(C.mach_absolute_time()) @@ -19,15 +19,15 @@ fn ticks() f64 { return f64(0) } -fn sleep(seconds int) { +pub fn sleep(seconds int) { C.sleep(seconds) } -fn usleep(seconds int) { +pub fn usleep(seconds int) { C.usleep(seconds) } -fn sleep_ms(seconds int) { +pub fn sleep_ms(seconds int) { C.usleep(seconds * 1000) }