[time-nuts] Discipline an oscillator with NTP?

Chris Albertson albertson.chris at gmail.com
Sat Jul 23 02:25:20 UTC 2011


Yes but in this case it really is easy;  Below is an outline (don't
try to compile it.).  It has a slight problem because just using
"sleep" is kind of simplistic.  One should wait on the new second and
add some error chacking   Point here is just to show  that this is not
weeks and weeks worth of work".  The below pulse a bit every second
and if the system is running NTP then the length of a second is
controlled by NTP.

Main()
{
int status;
int fd;
int pw = 1000  /* pulse width in uS */
fd=open("dev/tty",O_RDWR);
while(1) {
status = 1;
 ioctl(fd, TIOCMSET, &status);
ussleep(pw);
status = 0;
 ioctl(fd, TIOCMSET, &status);
  ussleep(1000000-pw);
}
}

On Fri, Jul 22, 2011 at 6:08 PM, Jim Lux <jimlux at earthlink.net> wrote:
> On 7/22/11 3:46 PM, brent evers wrote:
>>
>> "After that all you need to do is write some code to..."
>>
>> Oh - if I had a nickel for every time I've heard that!
>>
>> Brent
>>
>
> When I worked in the physical effects business, we'd get a set of
> storyboards from a director, and we'd have to figure out how we were going
> to build a rig or arrange the effect as required.   The catch phrase was
> always "then, all you gotta do is"...
>
> representing some sort of incredibly difficult, tedious, or impractical
> activity. Sure, install 10,000 lightbulb sockets into a frame and wire them
> up before tomorrow morning's call time at 6AM.. *all you gotta do* is get 50
> people to each wire 200 sockets, screw in the bulbs and test them.
>
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to
> https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.
>



-- 

Chris Albertson
Redondo Beach, California



More information about the time-nuts mailing list