Changeset 1357
- Timestamp:
- 12/06/08 11:28:40 (7 months ago)
- Files:
-
- trunk/lib/trace.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/trace.c
r1347 r1357 856 856 /* timeval -> timestamp */ 857 857 ts = packet->trace->format->get_timeval(packet); 858 timestamp = ((((uint64_t)ts.tv_sec) << 32) + \859 (((uint64_t)ts.tv_usec * UINT_MAX)/1000000));858 timestamp = ((((uint64_t)ts.tv_sec) << 32) + 859 (((uint64_t)ts.tv_usec << 32)/1000000)); 860 860 } else if (packet->trace->format->get_seconds) { 861 861 /* seconds -> timestamp */ 862 862 seconds = packet->trace->format->get_seconds(packet); 863 timestamp = ((uint64_t)((uint32_t)seconds) << 32) + \ 864 (uint64_t)(( seconds - (uint32_t)seconds ) * UINT_MAX); 863 timestamp = (((uint64_t)seconds)<<32) 864 + (uint64_t)((seconds-(uint64_t)seconds)*UINT_MAX); 865 865 866 } 866 867 return timestamp;
