[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #7855] Provide alternative timeout implementation
From: |
Michael Steinberg |
Subject: |
[lwip-devel] [patch #7855] Provide alternative timeout implementation |
Date: |
Sat, 08 Aug 2015 22:13:44 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0 |
Follow-up Comment #9, patch #7855 (project lwip):
Hello,
absolute timing is actually really great and simplifies stuff everywhere
(exaggerated, but well...).
See this sorting/comparison invariant which is in use in my code:
template< typename T, typename S = typename
std::enable_if<std::is_unsigned<T>::value>::type >
bool time_overflow_compare(T a, T b)
{
return T(b - a) <= (std::numeric_limits<T>::max() / 2);
}
I use this pattern to convert lwip timing calls to my own replaced timing. I
posted another patch proposal to allow custom timing on NO_SYS build.
Kind Regards
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?7855>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.nongnu.org/
- [lwip-devel] [patch #7855] Provide alternative timeout implementation,
Michael Steinberg <=