From 155e30ef23bb6cd7275d1a3b276a31ffa0267fcc Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Sun, 12 Apr 2015 09:04:27 +0000 Subject: [PATCH] Uses stop watch now. FossilOrigin-Name: 9994860057df0b5546fa934e65de85872e50dfeba1bb52b8363dea03c709fd72 --- src/ac/wtpman.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ac/wtpman.c b/src/ac/wtpman.c index be6bf5f3..2c4b7a4b 100644 --- a/src/ac/wtpman.c +++ b/src/ac/wtpman.c @@ -435,7 +435,9 @@ static void wtpman_run(void *arg) infile); - clock_t clk = cw_clock_start(); + DEFINE_CLOCK(clk); + cw_clock_start(&clk); + int rc=0; while (conn->capwap_state == CW_STATE_IMAGE_DATA && !feof(infile) && rc==0) { rc = cw_send_request(conn, CW_MSG_IMAGE_DATA_REQUEST); @@ -447,7 +449,7 @@ static void wtpman_run(void *arg) } else { cw_dbg(DBG_INFO,"Image '%s' sucessful sent to %s in %0.1f seconds.", - filename,sock_addr2str(&conn->addr),cw_clock_stop(clk)); + filename,sock_addr2str(&conn->addr),cw_clock_stop(&clk)); conn->capwap_state=CW_STATE_NONE; }