Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
get size of struct s_xbt_os_timer
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Mon, 12 Aug 2013 21:25:22 +0000 (23:25 +0200)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Mon, 12 Aug 2013 21:25:22 +0000 (23:25 +0200)
src/include/xbt/xbt_os_time.h
src/xbt/xbt_os_time.c

index a6d848d..11b2892 100644 (file)
@@ -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(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(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);
 
 XBT_PUBLIC(void) xbt_os_walltimer_start(xbt_os_timer_t timer);
 XBT_PUBLIC(void) xbt_os_walltimer_resume(xbt_os_timer_t timer);
index 4e0f331..f0d4387 100644 (file)
@@ -99,6 +99,10 @@ struct s_xbt_os_timer {
 #endif
 };
 
 #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);
 xbt_os_timer_t xbt_os_timer_new(void)
 {
   return xbt_new0(struct s_xbt_os_timer, 1);