git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1215
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
-/** @brief get time in seconds
-
- * gives the number of seconds since the Epoch (00:00:00 UTC, January 1, 1970).
- * Most users should use gras_os_time and should not use this function unless
- they really know what they are doing. */
-double xbt_os_time(void);
-
END_DECL()
#endif /* _XBT_SYSDEP_H */
END_DECL()
#endif /* _XBT_SYSDEP_H */
include/surf/surf.h \
include/surf/surf_parse.h \
\
include/surf/surf.h \
include/surf/surf_parse.h \
\
+ include/xbt/xbt_portability.h \
include/xbt/context.h \
\
msg/private.h \
include/xbt/context.h \
\
msg/private.h \
#include "xbt/sysdep.h"
#include "gras/virtu.h"
#include "xbt/sysdep.h"
#include "gras/virtu.h"
+#include "xbt/xbt_portability.h" /* private */
XBT_LOG_EXTERNAL_CATEGORY(virtu);
XBT_LOG_DEFAULT_CATEGORY(virtu);
double gras_os_time() {
XBT_LOG_EXTERNAL_CATEGORY(virtu);
XBT_LOG_DEFAULT_CATEGORY(virtu);
double gras_os_time() {
-#ifdef HAVE_GETTIMEOFDAY
- struct timeval tv;
-
- gettimeofday(&tv, NULL);
-
- return (double)(tv.tv_sec + tv.tv_usec / 1000000.0);
-#else
- /* Poor resolution */
- return (double)(time(NULL));
-#endif /* HAVE_GETTIMEOFDAY? */
-
}
void gras_os_sleep(double sec) {
}
void gras_os_sleep(double sec) {
#include "xbt/dict.h"
#include "gras/chrono.h"
#include "msg/msg.h"
#include "xbt/dict.h"
#include "gras/chrono.h"
#include "msg/msg.h"
+#include "xbt/xbt_portability.h"
#include "portable.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(chrono,gras,"Benchmarking used code");
#include "portable.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(chrono,gras,"Benchmarking used code");
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "xbt/sysdep.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "xbt/sysdep.h"
+#include "xbt/xbt_portability.h" /* private */
#include "xbt/log.h"
#include "xbt/error.h"
#include "portable.h"
#include "xbt/log.h"
#include "xbt/error.h"
#include "portable.h"