Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
2004-07-26 Martin Quinson
[simgrid.git] / include / gras / virtu.h
1 /* $Id$                     */
2
3 /* gras/virtu.h - public interface to virtualization (cross-OS portability) */
4
5 /* Authors: Martin Quinson                                                  */
6 /* Copyright (C) 2003,2004 da GRAS posse.                                   */
7
8 /* This program is free software; you can redistribute it and/or modify it
9    under the terms of the license (GNU LGPL) which comes with this package. */
10
11 #ifndef GRAS_VIRTU_H
12 #define GRAS_VIRTU_H
13
14 #include <stddef.h>    /* offsetof() */
15 #include <sys/types.h>  /* size_t */
16 #include <stdarg.h>
17
18
19 /*! C++ users need love */
20 #ifndef BEGIN_DECL
21 # ifdef __cplusplus
22 #  define BEGIN_DECL extern "C" {
23 # else
24 #  define BEGIN_DECL 
25 # endif
26 #endif
27
28 /*! C++ users need love */
29 #ifndef END_DECL
30 # ifdef __cplusplus
31 #  define END_DECL }
32 # else
33 #  define END_DECL 
34 # endif
35 #endif
36 /* End of cruft for C++ */
37
38 BEGIN_DECL
39
40 /**
41  * gras_os_time:
42  * @Returns: number of second since the Epoch.
43  * (00:00:00 UTC, January 1, 1970 in Real Life, and begining of simulation in SG)
44  * 
45  * Get the current time.
46  */
47 double gras_os_time(void);
48
49 /**
50  * gras_os_sleep:
51  * @Param1: number of seconds to sleep
52  * @Param2: number of microseconds to sleep
53  * 
54  * sleeps for the given amount of time.
55  */
56 void gras_os_sleep(unsigned long sec, unsigned long usec);
57
58 END_DECL
59
60 #endif /* GRAS_VIRTU_H */
61