From 5ae71f5b80e26a9ee77f4a0c4c32b93cfa417a8d Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 11 Mar 2021 12:49:52 +0800 Subject: [PATCH] [TD-3143] : make taosdemo works on windows. fix time shifting. --- src/kit/taosdemo/taosdemo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index dd0644ade9..9f51bfcd0e 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -4179,10 +4179,11 @@ static void* syncWrite(void *sarg) { winfo->totalAffectedRows = 0; for (int tID = winfo->start_table_id; tID <= winfo->end_table_id; tID++) { + int64_t tmp_time = time_counter; + for (int i = 0; i < g_args.num_of_DPT;) { int tblInserted = i; - int64_t tmp_time = time_counter; char *pstr = buffer; pstr += sprintf(pstr, @@ -4251,7 +4252,7 @@ static void* syncWrite(void *sarg) { winfo->avgDelay = (double)winfo->totalDelay / winfo->cntDelay; } - verbosePrint("%s() LN%d: totalaffectedRows:%"PRId64"\n", __func__, __LINE__, winfo->totalAffectedRows); + verbosePrint("%s() LN%d: totalaffectedRows:%"PRId64" tblInserted\n", __func__, __LINE__, winfo->totalAffectedRows, tblInserted); if (g_args.insert_interval) { et = taosGetTimestampMs(); }