vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

commit 672d873303e1a44c253ed137e002a544987d1f9a
parent 9e30099aa83d0770a5eb021711b81617e6c33666
Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com>
Date:   Sun, 17 Oct 2010 21:51:09 +0200

devcons: fix uptime

Diffstat:
M.hgignore | 2+-
Msrc/9vx/time.c | 4+++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.hgignore b/.hgignore @@ -29,7 +29,7 @@ src/9vx/boot/libboot.a8 src/9vx/boot/bootcode.9 src/9vx/boot/bootfs/* src/9vx/boot/rootfs.bz2 -src/9vx/bootcode.S +src/9vx/boot.S src/9vx/9660srv.S src/9vx/bzfs.S src/9vx/bootinit.c diff --git a/src/9vx/time.c b/src/9vx/time.c @@ -25,6 +25,7 @@ struct Timers Timer *head; }; +static vlong start; static Timers timers; static void kicktimerproc(void); @@ -369,6 +370,7 @@ seconds(void) void todinit(void) { + start = todget(nil); } void @@ -400,7 +402,7 @@ todget(vlong *ticksp) gettimeofday(&tv, NULL); t = tv.tv_sec*1000000000LL + tv.tv_usec*1000LL; if(ticksp) - *ticksp = t; + *ticksp = t - start; return t; }