[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] sys_timeout firing too often.
From: |
Nick Thomas |
Subject: |
RE: [lwip-users] sys_timeout firing too often. |
Date: |
Fri, 5 Sep 2008 12:26:42 +0100 |
-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf
Of Kieran Mansley
Sent: 05 September 2008 12:18
To: Mailing list for lwIP users
Subject: Re: [lwip-users] sys_timeout firing too often.
On Fri, 2008-09-05 at 12:08 +0100, Nick Thomas wrote:
>> The msec_to_tick appears to overflow with a large number (like 5000) - or
am
>> I wrong.
> If that's the case then putting in a couple of brackets so the division
> happens before the multiplication would solve the problem.
>Kieran
OK, so it becomes:
//#define tick_to_msec(tick) ((u32_t)((tick) * 1000 / time_ticks_per_sec()))
#define tick_to_msec(tick) ((u32_t)(((tick) / time_ticks_per_sec()) *
1000))
//#define msec_to_tick(msec) ((clock_t)((msec) * time_ticks_per_sec() /
1000))
#define msec_to_tick(msec) ((clock_t)((msec) * (time_ticks_per_sec() /
1000)))
I will give that a go. Thanks.
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
- [lwip-users] sys_timeout firing too often., Nick Thomas, 2008/09/08
- Re: [lwip-users] sys_timeout firing too often., Kieran Mansley, 2008/09/08
- RE: [lwip-users] sys_timeout firing too often., Nick Thomas, 2008/09/08
- Re: [lwip-users] sys_timeout firing too often., address@hidden, 2008/09/08
- RE: [lwip-users] sys_timeout firing too often., Nick Thomas, 2008/09/08
- Re: [lwip-users] sys_timeout firing too often., address@hidden, 2008/09/08
- Re: [lwip-users] sys_timeout firing too often., Piero 74, 2008/09/09
- RE: [lwip-users] sys_timeout firing too often., Nick Thomas, 2008/09/09