Added some commenst.
FossilOrigin-Name: 9de424f6fce449ca8c2d68d82d22cd994ad3c957c78512acb6a92ae6ae866361
This commit is contained in:
parent
9d0a30c7f7
commit
2a383a3437
@ -39,7 +39,13 @@ typedef time_t cw_timer_t;
|
|||||||
* @param t number of seconds until the timer expires
|
* @param t number of seconds until the timer expires
|
||||||
* @return timer value to initialize a variable of time_t
|
* @return timer value to initialize a variable of time_t
|
||||||
*
|
*
|
||||||
* Example: time_t timer = cw_timer_start(60);
|
* Example:
|
||||||
|
* @code
|
||||||
|
* time_t timer = cw_timer_start(60);
|
||||||
|
* while (!cw_timer_timeout(timer)){
|
||||||
|
* // Do something for max. 60 seconds ...
|
||||||
|
* }
|
||||||
|
* @endcode
|
||||||
*/
|
*/
|
||||||
#define cw_timer_start(t) (time(NULL)+t)
|
#define cw_timer_start(t) (time(NULL)+t)
|
||||||
|
|
||||||
@ -77,7 +83,7 @@ typedef time_t cw_timer_t;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Start the clock (stop watch), start measuring time
|
* Start the clock (stop watch), start measuring time
|
||||||
* @param c a pouiter to a variable defined with #CW_CLOCK_DEFINE
|
* @param c a pointer to a variable defined with #CW_CLOCK_DEFINE
|
||||||
*/
|
*/
|
||||||
#define cw_clock_start(c)\
|
#define cw_clock_start(c)\
|
||||||
gettimeofday(c,NULL);
|
gettimeofday(c,NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user