Changeset 1627
- Timestamp:
- 07/27/10 17:06:31 (3 years ago)
- Location:
- trunk/examples/tutorial
- Files:
-
- 4 edited
-
headerdemo.c (modified) (1 diff)
-
lengthdemo.c (modified) (1 diff)
-
readdemo.c (modified) (2 diffs)
-
timedemo.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/tutorial/headerdemo.c
r1502 r1627 66 66 */ 67 67 68 while ( ts.tv_sec > next_report) {68 while ((uint32_t)ts.tv_sec > next_report) { 69 69 /* Print all our stats */ 70 70 print_stats(); -
trunk/examples/tutorial/lengthdemo.c
r1502 r1627 42 42 * with periods in which no packets are observed. 43 43 */ 44 while ( ts.tv_sec > next_report) {44 while ((uint32_t)ts.tv_sec > next_report) { 45 45 46 46 /* Print the timestamp for the report */ -
trunk/examples/tutorial/readdemo.c
r1502 r1627 6 6 #include <inttypes.h> 7 7 #include <err.h> 8 #include <assert.h> 8 9 9 10 uint64_t count = 0; … … 12 13 static void per_packet(libtrace_packet_t *packet) 13 14 { 15 assert(packet); 14 16 /* This function turns out to be really simple, because we are just 15 17 * counting the number of packets in the trace */ -
trunk/examples/tutorial/timedemo.c
r1502 r1627 38 38 * with periods in which no packets are observed. 39 39 */ 40 while ( ts.tv_sec > next_report) {40 while ((uint32_t)ts.tv_sec > next_report) { 41 41 /* Print a timestamp for the report and the packet count */ 42 42 printf("%u \t%" PRIu64 "\n", next_report, count);
Note: See TracChangeset
for help on using the changeset viewer.
