3 /* gras/virtu.h - public interface to virtualization (cross-OS portability) */
5 /* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved. */
7 /* This program is free software; you can redistribute it and/or modify it
8 * under the terms of the license (GNU LGPL) which comes with this package. */
13 #include "xbt/misc.h" /* SG_BEGIN_DECL */
17 /** @addtogroup GRAS_virtu
18 * @brief System call abstraction layer.
24 /** @brief Get the current time
25 * @return number of second since the Epoch.
26 * (00:00:00 UTC, January 1, 1970 in Real Life, and begining of simulation in SG)
28 XBT_PUBLIC(double) gras_os_time(void);
30 /** @brief sleeps for the given amount of time.
31 * @param sec: number of seconds to sleep
33 XBT_PUBLIC(void) gras_os_sleep(double sec);
35 /** @brief get the fully-qualified name of the current host
37 * Returns the fully-qualified name of the host machine, or "localhost" if the name
38 * cannot be determined. Always returns the same value, so multiple calls
41 XBT_PUBLIC(const char *)
44 /** @brief returns the number on which this process is listening for incoming messages */
45 XBT_PUBLIC(int) gras_os_myport(void);
47 /** @brief get process identification
49 * Returns the process ID of the current process. (This is often used
50 by routines that generate unique temporary file names.)
52 XBT_PUBLIC(long int) gras_os_getpid(void);
57 #endif /* GRAS_VIRTU_H */