tisp

tiny lisp
git clone git://edryd.org/tisp
Log | Files | Refs | LICENSE

commit 3c662b0b6ab07812e1468e51e0f3a6622721fc81
parent a799b153148f88abb05684717a7f5f47f7359a1f
Author: Ed van Bruggen <edvb@uw.edu>
Date:   Fri, 15 Jan 2021 23:50:06 -0800

Return time in milliseconds

Diffstat:
tib/os.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tib/os.c b/tib/os.c @@ -64,7 +64,7 @@ prim_now(Tsp st, Hash env, Val args) } /* TODO time-avg: run timeit N times and take average */ -/* return time taken to run command given */ +/* return time in miliseconds taken to run command given */ static Val form_time(Tsp st, Hash env, Val args) { @@ -75,7 +75,7 @@ form_time(Tsp st, Hash env, Val args) if (!(v = tisp_eval(st, env, car(args)))) return NULL; t = clock() - t; - return mk_dec(((double)t)/CLOCKS_PER_SEC); + return mk_dec(((double)t)/CLOCKS_PER_SEC*100); } void