xref: /titanic_50/usr/src/lib/libshell/common/features/time (revision da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968)
1*da2e3ebdSchinhdr	utime
2*da2e3ebdSchinlib	gettimeofday,setitimer
3*da2e3ebdSchinmem	timeval.tv_usec sys/time.h
4*da2e3ebdSchintst	lib_2_timeofday note{ 2 arg gettimeofday() }end link{
5*da2e3ebdSchin	#include <sys/types.h>
6*da2e3ebdSchin	#include <sys/time.h>
7*da2e3ebdSchin	int main()
8*da2e3ebdSchin	{
9*da2e3ebdSchin		struct timeval tv;
10*da2e3ebdSchin		struct timezone tz;
11*da2e3ebdSchin		return gettimeofday(&tv, &tz);
12*da2e3ebdSchin	}
13*da2e3ebdSchin}end
14*da2e3ebdSchintst	lib_1_timeofday note{ 1 arg gettimeofday() }end link{
15*da2e3ebdSchin	#include <sys/types.h>
16*da2e3ebdSchin	#include <sys/time.h>
17*da2e3ebdSchin	int main()
18*da2e3ebdSchin	{
19*da2e3ebdSchin		struct timeval tv;
20*da2e3ebdSchin		return gettimeofday(&tv);
21*da2e3ebdSchin	}
22*da2e3ebdSchin}end
23*da2e3ebdSchincat{
24*da2e3ebdSchin	#undef _def_time
25*da2e3ebdSchin	#include	<times.h>
26*da2e3ebdSchin	#define _def_time	1
27*da2e3ebdSchin	#undef timeofday
28*da2e3ebdSchin	#if _lib_2_timeofday
29*da2e3ebdSchin	#define timeofday(p)	gettimeofday(p,(struct timezone*)0)
30*da2e3ebdSchin	#else
31*da2e3ebdSchin	#if _lib_1_timeofday
32*da2e3ebdSchin	#define timeofday(p)	gettimeofday(p)
33*da2e3ebdSchin	#endif
34*da2e3ebdSchin	#endif
35*da2e3ebdSchin}end
36