X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2a34c60af48746935a7495f736dcaa2e3e9c45a4..104ec12984d49e726b38234c5d8ecbfd3732b91e:/include/gras/timer.h diff --git a/include/gras/timer.h b/include/gras/timer.h index 5ac8ce8b0e..fa6e7c0012 100644 --- a/include/gras/timer.h +++ b/include/gras/timer.h @@ -1,9 +1,8 @@ -/* $Id$ */ - /* timer - delayed and repetitive tasks */ /* module's public interface exported to end user. */ -/* Copyright (c) 2005 Martin Quinson. All rights reserved. */ +/* Copyright (c) 2005, 2006, 2007, 2009, 2010. 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. */ @@ -13,10 +12,10 @@ #include "xbt/misc.h" -BEGIN_DECL() +SG_BEGIN_DECL() /** @addtogroup GRAS_timer - * @brief Delayed and repetitive tasks (Communication facility) + * @brief Delayed and repetitive tasks * * This is how to have a specific function called only once after the * specified amount of time or a function executed every 5 mn until it gets @@ -36,22 +35,20 @@ BEGIN_DECL() * * @{ */ +XBT_PUBLIC(void) gras_timer_delay(double delay, void_f_void_t action); +XBT_PUBLIC(void) gras_timer_repeat(double interval, void_f_void_t action); - typedef void (*void_f_void_t)(void); - - void gras_timer_delay(double delay, void_f_void_t action); - void gras_timer_repeat(double interval, void_f_void_t action); +XBT_PUBLIC(void) gras_timer_cancel_delay(double interval, + void_f_void_t action); +XBT_PUBLIC(void) gras_timer_cancel_repeat(double interval, + void_f_void_t action); - xbt_error_t gras_timer_cancel_delay(double interval, void_f_void_t action); - xbt_error_t gras_timer_cancel_repeat(double interval, void_f_void_t action); +XBT_PUBLIC(void) gras_timer_cancel_delay_all(void); +XBT_PUBLIC(void) gras_timer_cancel_repeat_all(void); - xbt_error_t gras_timer_cancel_delay_all(void); - xbt_error_t gras_timer_cancel_repeat_all(void); - - void gras_timer_cancel_all(void); +XBT_PUBLIC(void) gras_timer_cancel_all(void); /** @} */ -END_DECL() - -#endif /* GRAS_TIMER_H */ +SG_END_DECL() +#endif /* GRAS_TIMER_H */