From 31477a2d3ea7aed871b9dcc87c8a157c747bfae8 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 9 Oct 2012 19:12:11 +0200 Subject: print results even if no frames grabbed --- cli.c | 5 ++--- pcilib.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cli.c b/cli.c index 07d6cc2..b36f5be 100644 --- a/cli.c +++ b/cli.c @@ -1292,8 +1292,8 @@ void GrabStats(GRABContext *ctx, struct timeval *end_time) { end_time = &cur; } - if ((ctx->event_count + ctx->missing_count) == 0) - return; +// if ((ctx->event_count + ctx->missing_count) == 0) +// return; duration = pcilib_timediff(&ctx->start_time, end_time); fps_duration = pcilib_timediff(&ctx->first_frame, &ctx->last_frame); @@ -1315,7 +1315,6 @@ void GrabStats(GRABContext *ctx, struct timeval *end_time) { good_fps = (good - 1) / (1.*fps_duration/1000000); } - printf("Run: "); PrintTime(duration); diff --git a/pcilib.h b/pcilib.h index fe7af8c..0547461 100644 --- a/pcilib.h +++ b/pcilib.h @@ -32,7 +32,7 @@ typedef uint8_t pcilib_dma_engine_addr_t; typedef uint8_t pcilib_dma_engine_t; typedef uint64_t pcilib_event_id_t; typedef uint32_t pcilib_event_t; -typedef uint64_t pcilib_timeout_t; +typedef uint64_t pcilib_timeout_t; /**< In microseconds */ typedef enum { PCILIB_HOST_ENDIAN = 0, -- cgit v1.2.3