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