summaryrefslogtreecommitdiff
path: root/legacy/embryo/src/lib/embryo_time.c
diff options
context:
space:
mode:
authortsauerbeck <tsauerbeck>2004-10-12 16:15:54 +0000
committertsauerbeck <tsauerbeck@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2004-10-12 16:15:54 +0000
commit64b608f7e743fb6c6a4de4a85408ea047d6de10c (patch)
treec438570d2892be3d07be3750be3b1ad2636dbc9b /legacy/embryo/src/lib/embryo_time.c
parent226bc8ccf37c3d3fac1d50d79d808745f0566829 (diff)
works on mingw now
SVN revision: 11842
Diffstat (limited to '')
-rw-r--r--legacy/embryo/src/lib/embryo_time.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/legacy/embryo/src/lib/embryo_time.c b/legacy/embryo/src/lib/embryo_time.c
index 6601bffafe..22bfca41bf 100644
--- a/legacy/embryo/src/lib/embryo_time.c
+++ b/legacy/embryo/src/lib/embryo_time.c
@@ -1,7 +1,33 @@
1/*
2 * vim:ts=8:sw=3:sts=3:noexpandtab
3 */
1#include "embryo_private.h" 4#include "embryo_private.h"
2#include <sys/time.h> 5#include <sys/time.h>
3#include <time.h> 6#include <time.h>
4 7
8#ifndef HAVE_GETTIMEOFDAY
9#ifdef WIN32
10#include <sys/timeb.h>
11
12static int gettimeofday (struct timeval *tv, void *unused)
13{
14 struct _timeb t;
15
16 if (!tv)
17 return -1;
18
19 _ftime (&t);
20
21 tv->tv_sec = t.time;
22 tv->tv_usec = t.millitm * 1000;
23
24 return 0;
25}
26#else
27#error "Your platform isn't supported yet"
28#endif
29#endif
30
5/* exported time api */ 31/* exported time api */
6 32
7static Embryo_Cell 33static Embryo_Cell