summaryrefslogtreecommitdiff
path: root/contrib/pgbench/pgbench.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pgbench/pgbench.c')
-rw-r--r--contrib/pgbench/pgbench.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index 3256ebe84b7..398d2114300 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -1,5 +1,5 @@
/*
- * $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.27.2.1 2003/11/26 06:48:53 ishii Exp $
+ * $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.27.2.2 2003/12/07 19:56:07 tgl Exp $
*
* pgbench: a simple TPC-B like benchmark program for PostgreSQL
* written by Tatsuo Ishii
@@ -261,14 +261,14 @@ doOne(CState * state, int n, int debug, int ttype)
*/
if (use_log)
{
- long long diff;
+ double diff;
struct timeval now;
gettimeofday(&now, 0);
- diff = (now.tv_sec - st->txn_begin.tv_sec) * 1000000 +
- (now.tv_usec - st->txn_begin.tv_usec);
+ diff = (int) (now.tv_sec - st->txn_begin.tv_sec) * 1000000.0 +
+ (int) (now.tv_usec - st->txn_begin.tv_usec);
- fprintf(LOGFILE, "%d %d %lld\n", st->id, st->cnt, diff);
+ fprintf(LOGFILE, "%d %d %.0f\n", st->id, st->cnt, diff);
}
res = PQgetResult(st->con);