1 /* virtu - virtualization layer for XBT to choose between GRAS and MSG implementation */
3 /* Copyright (c) 2007-2010, 2012. The SimGrid Team.
4 * All rights reserved. */
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. */
10 #include "xbt/virtu.h"
11 #include "xbt/function_types.h"
12 #include "simgrid/simix.h"
14 static int xbt_fake_pid(void)
19 int_f_void_t xbt_getpid = xbt_fake_pid;
22 * Time elapsed since the beginning of the simulation.
26 /* FIXME: check if we should use the request mechanism or not */
27 return SIMIX_get_clock();
31 * Freeze the process for the specified amount of time
33 void xbt_sleep(double sec)
35 simcall_process_sleep(sec);
38 const char *xbt_procname(void)
40 return SIMIX_process_self_get_name();