[Darshan-commits] [Git][darshan/darshan][issue-229-negative-stdio] filter out negative times in INC macro
Philip Carns
xgitlab at cels.anl.gov
Fri May 5 13:03:56 CDT 2017
Philip Carns pushed to branch issue-229-negative-stdio at darshan / darshan
Commits:
22400120 by Phil Carns at 2017-05-05T13:03:44-05:00
filter out negative times in INC macro
- - - - -
1 changed file:
- darshan-runtime/darshan-common.h
Changes:
=====================================
darshan-runtime/darshan-common.h
=====================================
--- a/darshan-runtime/darshan-common.h
+++ b/darshan-runtime/darshan-common.h
@@ -18,10 +18,10 @@
#define DARSHAN_TIMER_INC_NO_OVERLAP(__timer, __tm1, __tm2, __last) do{ \
if(__tm1 > __last) \
__timer += (__tm2 - __tm1); \
- else \
+ else if(__tm2 > __last) {\
__timer += (__tm2 - __last); \
- if(__tm2 > __last) \
__last = __tm2; \
+ }\
} while(0)
/* increment histogram bucket depending on the given __value
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/22400120b1d1e48db229cde09bf37d89173a334c
---
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/22400120b1d1e48db229cde09bf37d89173a334c
You're receiving this email because of your account on xgitlab.cels.anl.gov.
More information about the Darshan-commits
mailing list