Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!acorn!agodwin From: agodwin@acorn.co.uk (Adrian Godwin) Newsgroups: comp.sys.3b1 Subject: Re: RTC precision? Keywords: RTC system clock microseconds Message-ID: <5578@acorn.co.uk> Date: 5 Mar 91 17:55:19 GMT References: <1991Feb27.195148.4122@sci.ccny.cuny.edu> <924@jonlab.UUCP> Organization: Acorn Computers Ltd, Cambridge, UK Lines: 43 In article <924@jonlab.UUCP> jon@jonlab.UUCP (Jon H. LaBadie) writes: >In article <1991Feb27.195148.4122@sci.ccny.cuny.edu>, jeffrey@sci.ccny.cuny.edu (Jeffrey L Bromberger) writes: >> I know that in weeks past, there was a big string on how to get an >> accurate timer to deal with times less than one second. Here's a I vaguely remember seeing this go by and of course, now it's gone, I want it :-(. I need to perform something like the following code, under CTIX 5.1 on a mini-20. This is part of ka9q's tcp/ip code, and wants its parent to be woken up at frequent intervals. I think it's normally set to 200ms. My current hack for this polls times(), which is far from satisfactory. Is this OS sufficiently closely related to the 3b1's that the same ideas can be used ? If so, I'd appreciate a summary of those postings (by mail). I think one of the postings suggested using a device driver to produce some sort of timing mark. I don't have any of the appropriate documentation for writing a device driver under CTIX - again, is the 3b1 documentation Thad was distributing at all relevant to my system ? Here's the code distributed for systems like SVR3 : parent = getppid(); timeout = atoi(argv[1]); fds.fd = -1; while (1) { if (poll(&fds,1,timeout) == -1) { perror("poll"); exit(1); } if (kill(parent,SIGALRM) == -1) exit(0); /* parent exited? */ } -adrian -- -------------------------------------------------------------------------- Adrian Godwin (agodwin@acorn.co.uk)