Changeset 1139


Ignore:
Timestamp:
Apr 3, 2007 5:59:32 PM (12 years ago)
Author:
bennylp
Message:

A little bit of improvement in pj_time_val_normalize()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/pjproject-0.5-stable/pjlib/src/pj/types.c

    r974 r1139  
    2525 
    2626    if (t->msec >= 1000) { 
    27         do { 
    28             t->sec++; 
    29             t->msec -= 1000; 
    30         } while (t->msec >= 1000); 
     27        t->sec += (t->msec / 1000); 
     28        t->msec = (t->msec % 1000); 
    3129    } 
    3230    else if (t->msec <= -1000) { 
Note: See TracChangeset for help on using the changeset viewer.