summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ece8568)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@592
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
/* time - time related syscal wrappers */
/* time - time related syscal wrappers */
-/* Copyright (c) 2004 Martin Quinson. All rights reserved. */
+/* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "xbt/sysdep.h"
#include "gras/virtu.h"
#include "xbt/sysdep.h"
#include "gras/virtu.h"
-#include <sys/time.h> /* gettimeofday() */
+#ifdef HAVE_GETTIMEOFDAY
struct timeval tv;
gettimeofday(&tv, NULL);
return (double)(tv.tv_sec * 1000000 + tv.tv_usec);
struct timeval tv;
gettimeofday(&tv, NULL);
return (double)(tv.tv_sec * 1000000 + tv.tv_usec);
+#else
+ /* Poor resolution */
+ return (double)(time(NULL));
+#endif /* HAVE_GETTIMEOFDAY? */
+
}
void gras_os_sleep(unsigned long sec,unsigned long usec) {
}
void gras_os_sleep(unsigned long sec,unsigned long usec) {