OSDN Git Service

mrcImageOpticalFlow & mrcImageLucasKanade & mrcImageHornSchunckの変更
[eos/base.git] / util / src / TclTk / tcl8.6.12 / compat / gettod.c
diff --git a/util/src/TclTk/tcl8.6.12/compat/gettod.c b/util/src/TclTk/tcl8.6.12/compat/gettod.c
new file mode 100644 (file)
index 0000000..f6651d4
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * gettod.c --
+ *
+ *     This file provides the gettimeofday function on systems
+ *     that only have the System V ftime function.
+ *
+ * Copyright (c) 1995 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#include "tclPort.h"
+#include <sys/timeb.h>
+
+#undef timezone
+
+int
+gettimeofday(
+    struct timeval *tp,
+    struct timezone *tz)
+{
+    struct timeb t;
+    (void)tz;
+
+    ftime(&t);
+    tp->tv_sec = t.time;
+    tp->tv_usec = t.millitm * 1000;
+    return 0;
+}
+