Changeset 3448:a1d933fa1897 in roaraudio
- Timestamp:
- 02/13/10 15:58:10 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroarpulse/timeval.c
r3447 r3448 54 54 int pa_timeval_cmp(const struct timeval *a, const struct timeval *b); 55 55 pa_usec_t pa_timeval_age(const struct timeval *tv); 56 struct timeval* pa_timeval_add(struct timeval *tv, pa_usec_t v); 56 struct timeval* pa_timeval_add(struct timeval *tv, pa_usec_t v) { 57 unsigned long long int secs; 58 59 if ( tv == NULL ) 60 return NULL; 61 62 secs = v/1000000LLU; 63 64 tv->tv_sec += secs; 65 66 v -= secs*1000000LLU; 67 68 tv->tv_usec += v; 69 70 while ( tv->tv_usec > 1000000LLU ) { 71 tv->tv_usec -= 1000000LLU; 72 tv->tv_sec += 1; 73 } 74 75 return tv; 76 } 57 77 58 78
Note: See TracChangeset
for help on using the changeset viewer.