Changeset dadc609
- Timestamp:
- 06/01/04 09:22:05 (18 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
- Children:
- c792590
- Parents:
- 63a2713
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/trace.c
r63a2713 rdadc609 687 687 struct pcap_pkthdr *pcapptr = 0; 688 688 uint64_t ts; 689 uint32_t seconds; 689 690 switch (libtrace->format) { 690 691 case PCAPINT: … … 699 700 case RTCLIENT: 700 701 default: 702 // FIXME: This isn't portable to big-endian machines 701 703 ts = get_erf_timestamp(libtrace,buffer,buflen); 702 tv.tv_sec = ts >> 32; 703 tv.tv_usec = ((long)ts)*1000000/UINT_MAX; 704 tv.tv_sec = ts >> 32; 705 ts = (1000000 * (ts & 0xffffffffULL)); 706 ts += (ts & 0x80000000ULL) << 1; 707 tv.tv_usec = ts >> 32; 708 if (tv.tv_usec >= 1000000) { 709 tv.tv_usec -= 1000000; 710 tv.tv_sec += 1; 711 } 704 712 break; 705 713 }
Note: See TracChangeset
for help on using the changeset viewer.