Commit 41c8b4cd authored by claes's avatar claes

Bugfix in Dcomp, 0 was not returned for equal times

parent 409b55d3
/** /**
* Proview $Id: co_time.c,v 1.8 2006-03-31 14:45:55 claes Exp $ * Proview $Id: co_time.c,v 1.9 2006-05-02 07:06:53 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -364,9 +364,11 @@ time_Dcomp ( ...@@ -364,9 +364,11 @@ time_Dcomp (
assertDelta(t1); assertDelta(t1);
assertDelta(t2); assertDelta(t2);
if (t1->tv_sec == t2->tv_sec) if (t1->tv_sec == t2->tv_sec) {
if (t1->tv_nsec == t2->tv_nsec)
return 0;
return ((t1->tv_nsec > t2->tv_nsec) ? 1 : -1); return ((t1->tv_nsec > t2->tv_nsec) ? 1 : -1);
else }
return ((t1->tv_sec > t2->tv_sec) ? 1 : -1); return ((t1->tv_sec > t2->tv_sec) ? 1 : -1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment