From 4cf68ca7fe6423530405c02ef968d8e6de9f2845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sebeck?= Date: Wed, 26 Jun 2019 16:10:42 +0200 Subject: [PATCH] making time-methods public, fixing gamme of life example --- time/time_lin.v | 6 +++--- time/time_mac.v | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) 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) }