[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Examples/Documentation Incorrect Timeout Code
From: |
HM2 |
Subject: |
Re: [lwip-users] Examples/Documentation Incorrect Timeout Code |
Date: |
Tue, 28 Apr 2009 00:09:58 -0700 |
http://lwip.wikia.com/wiki/LwIP_with_or_without_an_operating_system
http://www.sics.se/~adam/lwip/os.html
> However, since it does not explain what CLOCK_MS really is, it could
> also be ticks/ms (I would do it that way), which gives us "ticks - ticks
I came across this in various code ports, either defined in \arch cc.h or
clock.h
Not sure it is in the main file set of 1.3, but many people take the doc
examples and copy it.
They define it as 'clock msec'. So if the RTOS master tick is 10mSec, the
value is 10.
Your way the value would be 0.1, and that would not work as an integer.
>> I trust in users finding out what CLOCK_MS stands for and how it is to
be implemented correctly
In every case I have seen, it is used this way, and the results are wrong.
Since people are taking this example code and running with it without
checking,
it might be a good idea to spell out in the examples how CLOCK_MS is defined
so this doesn't get misused. Just one less pitfall for users. Just a
suggestion.
Chris.