From: Marion Guthmuller Date: Mon, 12 Aug 2013 21:25:22 +0000 (+0200) Subject: get size of struct s_xbt_os_timer X-Git-Tag: v3_9_90~128^2~7 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/586c2c145fe2ad01beca9945d823f71f6887a8b9 get size of struct s_xbt_os_timer --- diff --git a/src/include/xbt/xbt_os_time.h b/src/include/xbt/xbt_os_time.h index a6d848d5ae..11b2892e4c 100644 --- a/src/include/xbt/xbt_os_time.h +++ b/src/include/xbt/xbt_os_time.h @@ -20,10 +20,11 @@ XBT_PUBLIC(double) xbt_os_time(void); XBT_PUBLIC(void) xbt_os_sleep(double sec); typedef struct s_xbt_os_timer *xbt_os_timer_t; + XBT_PUBLIC(xbt_os_timer_t) xbt_os_timer_new(void); XBT_PUBLIC(void) xbt_os_timer_free(xbt_os_timer_t timer); XBT_PUBLIC(double) xbt_os_timer_elapsed(xbt_os_timer_t timer); - +XBT_PUBLIC(size_t) xbt_os_timer_size(void); XBT_PUBLIC(void) xbt_os_walltimer_start(xbt_os_timer_t timer); XBT_PUBLIC(void) xbt_os_walltimer_resume(xbt_os_timer_t timer); diff --git a/src/xbt/xbt_os_time.c b/src/xbt/xbt_os_time.c index 4e0f331857..f0d4387e53 100644 --- a/src/xbt/xbt_os_time.c +++ b/src/xbt/xbt_os_time.c @@ -99,6 +99,10 @@ struct s_xbt_os_timer { #endif }; +size_t xbt_os_timer_size(void){ + return sizeof(struct s_xbt_os_timer); +} + xbt_os_timer_t xbt_os_timer_new(void) { return xbt_new0(struct s_xbt_os_timer, 1);