Mercurial > MadButterfly
diff src/timer.c @ 43:6270230b9248
Use MB_TIMEVAL_CP() instead of memcpy
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sat, 09 Aug 2008 08:27:56 +0800 |
parents | 400b4b5db0dc |
children | c986e45c1e91 |
line wrap: on
line diff
--- a/src/timer.c Sat Aug 09 08:06:45 2008 +0800 +++ b/src/timer.c Sat Aug 09 08:27:56 2008 +0800 @@ -53,7 +53,7 @@ if(timer == NULL) return NULL; - memcpy(&timer->tmo, tmo, sizeof(mb_timeval_t)); + MB_TIMEVAL_CP(&timer->tmo, tmo); timer->hdlr = hdlr; timer->arg = arg; @@ -96,7 +96,7 @@ return OK; } - memcpy(tmo_after, &timer->tmo, sizeof(mb_timeval_t)); + MB_TIMEVAL_CP(tmo_after, &timer->tmo); MB_TIMEVAL_DIFF(tmo_after, now); return OK;