1 /* Copyright (c) 2007, 2009, 2010. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
9 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_util, smpi,
10 "Logging specific to SMPI (utilities)");
13 int smpi_gettimeofday(struct timeval *tv, struct timezone *tz)
22 now = SIMIX_get_clock();
24 tv->tv_usec = ((now - (double) tv->tv_sec) * 1000000.0);
30 unsigned int smpi_sleep(unsigned int seconds)
36 host = SIMIX_host_self();
37 action = SIMIX_action_sleep(host, (double)seconds);
38 smpi_process_wait_action(action);
39 SIMIX_action_destroy(action);
44 void smpi_exit(int status)
47 smpi_process_finalize();
48 SIMIX_process_kill(SIMIX_process_self());