Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
c298083f315e33021f8dcce59deda33ed28c87ea
[simgrid.git] / include / xbt / virtu.h
1 /* virtu - virtualization layer for XBT to choose between GRAS and MSG implementation */
2
3 /* Copyright (c) 2007, 2009, 2010. The SimGrid Team.
4  * All rights reserved.                                                     */
5
6 /* This program is free software; you can redistribute it and/or modify it
7   * under the terms of the license (GNU LGPL) which comes with this package. */
8
9 #ifndef __XBT_VIRTU_H__
10 #define __XBT_VIRTU_H__
11
12 #include "xbt/misc.h"
13 #include "xbt/sysdep.h"
14 #include "xbt/function_types.h"
15
16 SG_BEGIN_DECL()
17
18 /* Get the PID of the current (simulated) process */
19 XBT_PUBLIC_DATA(int_f_void_t) xbt_getpid;
20
21 /* Current time */
22 XBT_PUBLIC(double) xbt_time(void);
23
24     /* Get the name of the UNIX process englobing the world */
25     XBT_PUBLIC(const char*) xbt_os_procname(void);
26
27     /**
28      *
29      * Time management functions, returns the system time or sleeps a process. They work both on the simulated and real systems(GRAS).
30      */
31     XBT_PUBLIC(double) xbt_time(void);
32     XBT_PUBLIC(void) xbt_sleep(double sec);
33
34
35 SG_END_DECL()
36 #endif                          /* __XBT_VIRTU_H__ */