summaryrefslogtreecommitdiffstats
path: root/src/lib/krb4/unix_time.c
blob: 411ee38d62302e9e4c58c275f70200f742eaf735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * unix_time.c
 * 
 * Glue code for pasting Kerberos into the Unix environment.
 *
 * Originally written by John Gilmore, Cygnus Support, May '94.
 * Public Domain.
 */

#include "krb.h"
#include <sys/time.h>

/* Time handling.  Translate Unix time calls into Kerberos cnternal 
   procedure calls.  See ../../include/cc-unix.h.  */

unsigned KRB4_32 KRB5_CALLCONV
unix_time_gmt_unixsec (usecptr)
	unsigned KRB4_32	*usecptr;
{
	struct timeval	now;

	(void) gettimeofday (&now, (struct timezone *)0);
	if (usecptr)
		*usecptr = now.tv_usec;
	return now.tv_sec;
}