28 lines
878 B
C
28 lines
878 B
C
/* Copyright (c) 1993 UNIX System Laboratories, Inc. */
|
|
/* All Rights Reserved */
|
|
|
|
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
|
|
/* UNIX System Laboratories, Inc. */
|
|
/* The copyright notice above does not evidence any */
|
|
/* actual or intended publication of such source code. */
|
|
|
|
/* copyright "%c%" */
|
|
|
|
#ident "@(#)acct:common/cmd/acct/lib/tmless.c 1.5.3.3"
|
|
#ident "$Header: /proj/irix6.5.7m/isms/eoe/cmd/acct/lib/RCS/tmless.c,v 1.2 1993/11/05 04:26:07 jwag Exp $"
|
|
/*
|
|
* return 1 if t1 earlier than t2 (times in localtime format)
|
|
* assumed that t1 and t2 are in same day
|
|
*/
|
|
#include <time.h>
|
|
|
|
tmless(t1, t2)
|
|
register struct tm *t1, *t2;
|
|
{
|
|
if (t1->tm_hour != t2->tm_hour)
|
|
return(t1->tm_hour < t2->tm_hour);
|
|
if (t1->tm_min != t2->tm_min)
|
|
return(t1->tm_min < t2->tm_min);
|
|
return(t1->tm_sec < t2->tm_sec);
|
|
}
|