summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-04-03 17:59:32 +0000
committerBenny Prijono <bennylp@teluu.com>2007-04-03 17:59:32 +0000
commitf70eaac43dd8c4818767b8d4947045eb9195ad3f (patch)
tree1706362aa7033ec7d498efba49ede32809dac98b
parent6bba003138c84d88d238bf5e888c0669a7b9e7c9 (diff)
A little bit of improvement in pj_time_val_normalize()
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/pjproject-0.5-stable@1139 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjlib/src/pj/types.c6
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 {