24 lines
640 B
C
Executable File
24 lines
640 B
C
Executable File
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
|
|
/* All Rights Reserved */
|
|
|
|
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
|
|
/* The copyright notice above does not evidence any */
|
|
/* actual or intended publication of such source code. */
|
|
|
|
#ident "@(#)tmsecs.c 1.3 89/11/07 SMI" /* SVr4.0 1.5 */
|
|
/*
|
|
* tmsecs returns number of seconds from t1 to t2,
|
|
* times expressed in localtime format.
|
|
* assumed that t1 <= t2, and are in same day.
|
|
*/
|
|
|
|
#include <time.h>
|
|
long
|
|
tmsecs(t1, t2)
|
|
register struct tm *t1, *t2;
|
|
{
|
|
return((t2->tm_sec - t1->tm_sec) +
|
|
60*(t2->tm_min - t1->tm_min) +
|
|
3600L*(t2->tm_hour - t1->tm_hour));
|
|
}
|