From: thiery Date: Mon, 10 Jul 2006 14:00:57 +0000 (+0000) Subject: This function could be useful. X-Git-Tag: v3.3~2830 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/dc623452c9774e898e5547d8aa3757d1621aeb75?hp=058c687b139f1131ed53c1ddf5703e3e704bb4f8 This function could be useful. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2528 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/include/simdag/simdag.h b/include/simdag/simdag.h index d68a59d21d..429618beee 100644 --- a/include/simdag/simdag.h +++ b/include/simdag/simdag.h @@ -127,6 +127,7 @@ void* SD_task_dependency_get_data(SD_task_t src, SD_task_t dst); void SD_init(int *argc, char **argv); void SD_create_environment(const char *platform_file); SD_task_t* SD_simulate(double how_long); +double SD_get_clock(void); void SD_exit(void); /** @} */ diff --git a/src/simdag/sd_global.c b/src/simdag/sd_global.c index 56eb8b33cf..0d765d5790 100644 --- a/src/simdag/sd_global.c +++ b/src/simdag/sd_global.c @@ -226,7 +226,16 @@ SD_task_t* SD_simulate(double how_long) } /** - * \brief Destroys all SD internal data. + * \brief Returns the current clock + * + * \return the current clock, in second + */ +double SD_get_clock(void) { + return surf_get_clock(); +} + +/** + * \brief Destroys all SD internal data * * This function should be called when the simulation is over. Don't forget also to destroy * the tasks.