summaryrefslogtreecommitdiff
path: root/src/cmd/ksh93/features/time
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-06-24 22:28:35 +0000
committerIgor Pashev <pashev.igor@gmail.com>2012-06-24 22:28:35 +0000
commit3950ffe2a485479f6561c27364d3d7df5a21d124 (patch)
tree468c6e14449d1b1e279222ec32f676b0311917d2 /src/cmd/ksh93/features/time
downloadksh-upstream.tar.gz
Imported Upstream version 93u+upstream
Diffstat (limited to 'src/cmd/ksh93/features/time')
-rw-r--r--src/cmd/ksh93/features/time35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/cmd/ksh93/features/time b/src/cmd/ksh93/features/time
new file mode 100644
index 0000000..f8d2129
--- /dev/null
+++ b/src/cmd/ksh93/features/time
@@ -0,0 +1,35 @@
+hdr utime
+lib gettimeofday,setitimer
+mem timeval.tv_usec sys/time.h
+tst lib_2_timeofday note{ 2 arg gettimeofday() }end link{
+ #include <sys/types.h>
+ #include <sys/time.h>
+ int main()
+ {
+ struct timeval tv;
+ struct timezone tz;
+ return gettimeofday(&tv, &tz);
+ }
+}end
+tst lib_1_timeofday note{ 1 arg gettimeofday() }end link{
+ #include <sys/types.h>
+ #include <sys/time.h>
+ int main()
+ {
+ struct timeval tv;
+ return gettimeofday(&tv);
+ }
+}end
+cat{
+ #undef _def_time
+ #include <times.h>
+ #define _def_time 1
+ #undef timeofday
+ #if _lib_2_timeofday
+ #define timeofday(p) gettimeofday(p,(struct timezone*)0)
+ #else
+ #if _lib_1_timeofday
+ #define timeofday(p) gettimeofday(p)
+ #endif
+ #endif
+}end