calleapwhen.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (c) 1996 by Sun Microsystems, Inc.
* All Rights Reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* calleapwhen - determine the number of seconds to the next possible
* leap occurance and the last one.
*/
#include "ntp_types.h"
#include "ntp_calendar.h"
#include "ntp_stdlib.h"
/*
* calleaptab - leaps occur at the end of December and June
*/
long calleaptab[10] = {
};
void
{
register u_long dateincycle;
register int i;
/*
* Find the offset from the start of the cycle
*/
if (dateincycle >= MAR1988)
dateincycle -= MAR1988;
else
dateincycle -= MAR1900;
while (dateincycle >= SECSPERCYCLE)
/*
* Find where we are with respect to the leap events.
*/
for (i = 1; i < 9; i++)
break;
/*
* i points at the next leap. Compute the last and the next.
*/
}