RTC precision?

Adrian Godwin agodwin at acorn.co.uk
Wed Mar 6 03:55:19 AEST 1991


In article <924 at jonlab.UUCP> jon at jonlab.UUCP (Jon H. LaBadie) writes:
>In article <1991Feb27.195148.4122 at sci.ccny.cuny.edu>, jeffrey at 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 at acorn.co.uk)



More information about the Comp.sys.3b1 mailing list