X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d5b29830df70e823202e384a7655e4371193ecd7..e71a2a302d28430dc1bfee906f842f5f3d0fa3ce:/include/xbt/xbt_os_time.h diff --git a/include/xbt/xbt_os_time.h b/include/xbt/xbt_os_time.h index e7b2c244c7..15b54af536 100644 --- a/include/xbt/xbt_os_time.h +++ b/include/xbt/xbt_os_time.h @@ -1,6 +1,6 @@ /* xbt/xbt_os_timer.h -- system dependency on time functions */ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -11,34 +11,35 @@ #include /* XBT_PUBLIC */ #include /* size_t */ -SG_BEGIN_DECL() +SG_BEGIN_DECL /** @brief get time in seconds * * gives the number of seconds since the Epoch (00:00:00 UTC, January 1, 1970). */ -XBT_PUBLIC(double) xbt_os_time(void); -XBT_PUBLIC(void) xbt_os_sleep(double sec); +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; +typedef const struct s_xbt_os_timer* const_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 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(const_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_stop(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); +XBT_PUBLIC void xbt_os_walltimer_stop(xbt_os_timer_t timer); -XBT_PUBLIC(void) xbt_os_cputimer_start(xbt_os_timer_t timer); -XBT_PUBLIC(void) xbt_os_cputimer_resume(xbt_os_timer_t timer); -XBT_PUBLIC(void) xbt_os_cputimer_stop(xbt_os_timer_t timer); +XBT_PUBLIC void xbt_os_cputimer_start(xbt_os_timer_t timer); +XBT_PUBLIC void xbt_os_cputimer_resume(xbt_os_timer_t timer); +XBT_PUBLIC void xbt_os_cputimer_stop(xbt_os_timer_t timer); -XBT_PUBLIC(void) xbt_os_threadtimer_start(xbt_os_timer_t timer); -XBT_PUBLIC(void) xbt_os_threadtimer_resume(xbt_os_timer_t timer); -XBT_PUBLIC(void) xbt_os_threadtimer_stop(xbt_os_timer_t timer); +XBT_PUBLIC void xbt_os_threadtimer_start(xbt_os_timer_t timer); +XBT_PUBLIC void xbt_os_threadtimer_resume(xbt_os_timer_t timer); +XBT_PUBLIC void xbt_os_threadtimer_stop(xbt_os_timer_t timer); -SG_END_DECL() +SG_END_DECL #endif