From 86f89f2f8d40a3b03566bbd11dccceb196beaefe Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Fri, 4 Oct 2019 14:50:08 +0200 Subject: [PATCH] fix --- snippets/test1/test1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/snippets/test1/test1.c b/snippets/test1/test1.c index aaf302a..cbee741 100644 --- a/snippets/test1/test1.c +++ b/snippets/test1/test1.c @@ -154,10 +154,10 @@ int main (void) { my_diff = diff; pthread_mutex_unlock(&counterMutex); - if (diff != lastDiff) { - lastDiff = diff; - double f = 1.0 / (((double) diff) / 1000000.0); - printf("%d %d %d %f\n", ec, counter, diff, f); + if (my_diff != lastDiff) { + lastDiff = my_diff; + double f = 1.0 / (((double) my_diff) / 1000000.0); + printf("%d %d %d %f\n", my_ec, my_counter, my_diff, f); } } }