X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/eb5b6b0c3c4d9a38bb205b2c8bc9aeeba8674a25..3297da9f47ce18371941b2b48a2f4018b4793ced:/include/xbt/xbt_os_time.h diff --git a/include/xbt/xbt_os_time.h b/include/xbt/xbt_os_time.h index 0b1341aa29..074218bab8 100644 --- a/include/xbt/xbt_os_time.h +++ b/include/xbt/xbt_os_time.h @@ -1,39 +1,44 @@ /* xbt/xbt_os_timer.h -- system dependency on time functions */ -/* Copyright (c) 2007, 2009-2010, 2012-2014. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2018. 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. */ -#ifndef _XBT_OS_TIMER_H -#define _XBT_OS_TIMER_H +#ifndef XBT_OS_TIMER_H +#define XBT_OS_TIMER_H #include /* XBT_PUBLIC */ +#include /* size_t */ -/** @brief get time in seconds +SG_BEGIN_DECL() - * 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); +/** @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); 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 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_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); + +SG_END_DECL() -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); #endif