Date: Thu, 21 Jun 2001 14:51:38 +0200 (CEST) From: Martin Blapp <mb@imp.ch> To: <smp@FreeBSD.org> Cc: Brad Karp <bkarp@icsi.berkeley.edu>, <phk@FreeBSD.org> Subject: RE: clock speedup on SMP boxes Message-ID: <20010621144914.P766-100000@levais.imp.ch> In-Reply-To: <20010621143000.I766-100000@levais.imp.ch>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Just gettimeofday() produces 8sec time drifting now. No need to use poll() in our little programm I sent previously. There is no time drifting if we used a 100% load programm with just poll(). Very strange. Do you have some idea ? Martin Martin Blapp, mb@imp.ch ------------------------------------------------ Improware AG, UNIX solution and service provider Zurlindenstrasse 29, 4133 Pratteln, Switzerland Phone: +41 79 370 26 05, Fax: +41 61 826 93 01 ------------------------------------------------ > #include <sys/types.h> > #include <sys/time.h> > #include <err.h> > #include <fcntl.h> > #include <poll.h> > > #define DATA "/dev/zero" > > int > main(void) > { > int fd; > struct pollfd pfd; > > fd = open(DATA, O_RDONLY); > if(fd < 0) { > err(1, "open()"); > } > for(;;) { > int nfds; > struct timeval tv; > struct timezone tz; > > pfd.fd = fd; > pfd.events = POLLRDNORM; > pfd.revents = 0; > > nfds = poll(&pfd, 1, 0); > gettimeofday(&tv, &tz); > } > return (0); > } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010621144914.P766-100000>