summaryrefslogtreecommitdiff
path: root/legacy/embryo/src/lib/embryo_time.c
diff options
context:
space:
mode:
authordoursse <doursse>2008-04-11 05:59:42 +0000
committerdoursse <doursse@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2008-04-11 05:59:42 +0000
commit9817e365b151b73a2b960252580b1890ddd07358 (patch)
tree3d4b3ca389e3ec4ed410910e26743c1c8c8fda6f /legacy/embryo/src/lib/embryo_time.c
parentabfa4b4cd8dc1985f228ebbbc4995c7d43a4851e (diff)
fix gettimeofday on windows and add __UNUSED__ for unused parameters
SVN revision: 34245
Diffstat (limited to '')
-rw-r--r--legacy/embryo/src/lib/embryo_time.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/legacy/embryo/src/lib/embryo_time.c b/legacy/embryo/src/lib/embryo_time.c
index 5e03eb1834..beaa9b3a19 100644
--- a/legacy/embryo/src/lib/embryo_time.c
+++ b/legacy/embryo/src/lib/embryo_time.c
@@ -6,32 +6,13 @@
6#include <time.h> 6#include <time.h>
7 7
8#ifndef HAVE_GETTIMEOFDAY 8#ifndef HAVE_GETTIMEOFDAY
9#ifdef WIN32 9# error "Your platform isn't supported yet"
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 10#endif
30 11
31/* exported time api */ 12/* exported time api */
32 13
33static Embryo_Cell 14static Embryo_Cell
34_embryo_time_seconds(Embryo_Program *ep, Embryo_Cell *params) 15_embryo_time_seconds(Embryo_Program *ep __UNUSED__, Embryo_Cell *params __UNUSED__)
35{ 16{
36 struct timeval timev; 17 struct timeval timev;
37 double t; 18 double t;