diff options
Diffstat (limited to 'pjlib/src/pj/types.c')
-rw-r--r-- | pjlib/src/pj/types.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pjlib/src/pj/types.c b/pjlib/src/pj/types.c index 33c56775..030d6fce 100644 --- a/pjlib/src/pj/types.c +++ b/pjlib/src/pj/types.c @@ -24,10 +24,8 @@ void pj_time_val_normalize(pj_time_val *t) PJ_CHECK_STACK(); if (t->msec >= 1000) { - do { - t->sec++; - t->msec -= 1000; - } while (t->msec >= 1000); + t->sec += (t->msec / 1000); + t->msec = (t->msec % 1000); } else if (t->msec <= -1000) { do { |