9fans archive / 1996 / 11 / 21 / prev next
From: Nigel Roles ngr@sym...
Subject: XaoS - fast realtime fractal zoomer
Date: Fri, 8 Nov 1996 11:17:49 +0100
> I did port of my XaoS to plan9. I have just small problem with timmings.
> Is there any functions that returns time in miliseconds or such like
> gettimeofday?
Damn - try again.
int
msec(void)
{
static int fd = -1;
char buf[20]; /* ish */
if (fd < 0)
fd = open("/dev/msec", OREAD);
else
seek(fd, 0, 0);
read(fd, buf, sizeof(buf));
return atoi(buf);
}
Nigel Roles