From a86a500b07cb6aa8a7147016b113ec19f0975b32 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Wed, 20 Jan 2021 08:08:17 +0100 Subject: [PATCH] checkspeed: use startclock instead of lastclock to ensure Linux compatibility. --- src/frontend/outitf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/outitf.c b/src/frontend/outitf.c index 93eaa6ce5..57adc3904 100644 --- a/src/frontend/outitf.c +++ b/src/frontend/outitf.c @@ -82,7 +82,7 @@ int fixme_inoise_type = SV_NOTYPE; #define DOUBLE_PRECISION 15 -static clock_t lastclock, currclock; +static clock_t lastclock, currclock, startclock; static double *rowbuf; static size_t column, rowbuflen; @@ -433,7 +433,7 @@ beginPlot(JOB *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analNam sh_vecinit(run); #endif - lastclock = clock(); + startclock = clock(); return (OK); } @@ -547,7 +547,7 @@ OUTpD_memory(runDesc *run, IFvalue *refValue, IFvalue *valuePtr) if (ft_ngdebug && d->type == IF_REAL && eq(d->name, "speedcheck")) { /* current time */ clock_t cl = clock(); - double tt = ((double)cl - (double)lastclock) / CLOCKS_PER_SEC; + double tt = ((double)cl - (double)startclock) / CLOCKS_PER_SEC; plotAddRealValue(d, tt); } else if (d->type == IF_REAL)