Changeset 2931

Show
Ignore:
Timestamp:
11/16/99 10:44:29 (15 years ago)
Author:
ucacoxh
Message:

- Added ts_to_us. Useful for logging.

Location:
rat/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • rat/trunk/ts.c

    r2735 r2931  
    255255} 
    256256 
     257u_int32 
     258ts_to_us(ts_t t1) 
     259{ 
     260        double  r; 
     261        u_int32 f; 
     262        assert(ts_valid(t1)); 
     263        f = ts_get_freq(t1); 
     264        r = t1.ticks * 1000000.0/(double)f; 
     265        return (u_int32)r; 
     266} 
    257267 
    258268int  
  • rat/trunk/ts.h

    r2735 r2931  
    4545u_int32  ts_to_ms(ts_t t1); 
    4646 
     47/* Conversion to microseconds */ 
     48u_int32  ts_to_us(ts_t t1); 
     49 
    4750/* Debugging functions */ 
    4851int      ts_valid(ts_t t1);