diff options
author | Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> | 2015-09-17 11:31:29 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-09-22 21:15:18 +0300 |
commit | 5f12c19908dad6f259b253204bf549267962db7f (patch) | |
tree | 73d16da709193570c13759e035129528da34e1a2 | |
parent | a68bb98477f2de7c1a6afde1fe6c92069b4dc053 (diff) |
linux-generic: odp_time: reutrn 0 if t2 = t1 for diff
When times are equal the difference should be 0. Currently it's equal
to UINT64_MAX and doesn't allow to compare ranges beginning from
start time. The validation test to check it will be added later.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
-rw-r--r-- | platform/linux-generic/odp_time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/linux-generic/odp_time.c b/platform/linux-generic/odp_time.c index a08833d..a007d69 100644 --- a/platform/linux-generic/odp_time.c +++ b/platform/linux-generic/odp_time.c @@ -14,7 +14,7 @@ uint64_t odp_time_diff_cycles(uint64_t t1, uint64_t t2) { - if (odp_likely(t2 > t1)) + if (odp_likely(t2 >= t1)) return t2 - t1; return t2 + (UINT64_MAX - t1); |