Changeset ee2ea572 for test


Ignore:
Timestamp:
07/02/13 14:55:03 (7 years ago)
Author:
Shane Alcock <salcock@…>
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:
212faa13
Parents:
ef5a9ab
Message:
  • Allow 1 microsecond of fudge factor in the timestamp comparison to allow for rounding error
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/test-convert.c

    ref5a9ab ree2ea572  
    119119        tv2 = trace_get_timeval(packet2);
    120120       
    121         if (tv1.tv_sec != tv2.tv_sec || tv1.tv_usec != tv2.tv_usec) {
    122                 printf("Timestamps differ: %u.%u vs %u.%u",
     121        if (tv1.tv_sec != tv2.tv_sec ||
     122                tv1.tv_usec - tv2.tv_usec > 1 ||
     123                tv2.tv_usec - tv1.tv_usec > 1) {
     124                printf("Timestamps differ: %u.%u vs %u.%u\n",
    123125                                tv1.tv_sec, tv1.tv_usec,
    124126                                tv2.tv_sec, tv2.tv_usec);
Note: See TracChangeset for help on using the changeset viewer.