Tests: Clock mock and test node got some fixes

This commit is contained in:
Pavel Kirienko
2014-03-23 21:34:42 +04:00
parent 1171ef30e8
commit 42fdadba2c
2 changed files with 12 additions and 4 deletions
+3 -3
View File
@@ -150,9 +150,9 @@ struct InterlinkedTestNodes
int spinBoth(uavcan::MonotonicDuration duration)
{
assert(duration.isPositive());
unsigned int nspins2 = duration.toMSec() / 2 + 1;
assert(nspins2 > 0);
assert(!duration.isNegative());
unsigned int nspins2 = duration.toMSec() / 2;
nspins2 = nspins2 ? nspins2 : 1;
while (nspins2 --> 0)
{
int ret = -1;