Fixed side-effects bugs.

FossilOrigin-Name: 6b939062f9b8cd4d1a3833a77297033bd2a6cd30ef8ea6fa5fb5e83f400d378f
This commit is contained in:
7u83@mail.ru 2016-03-27 02:23:06 +00:00
parent 0f2c02b32a
commit e47db3deb6
1 changed files with 2 additions and 2 deletions

View File

@ -46,14 +46,14 @@ typedef time_t cw_timer_t;
* }
* @endcode
*/
#define cw_timer_start(t) (time(NULL)+t)
#define cw_timer_start(t) (time(NULL)+(t))
/**
* Check if a timer is expired.
* @param t a variable of type #cw_timer_t intialized by #cw_timer_start
* @return 0=timer is not expired\n 1=timer is expired.
*/
#define cw_timer_timeout(t) (time(NULL)>t ? 1 : 0)
#define cw_timer_timeout(t) (time(NULL)>(t) ? 1 : 0)
/**
* Get the number of nano seconds from a timeval.