On Fri, Oct 21, 2016 at 11:20:00AM -0700, will sanfilippo wrote:
> Yes, possibly. We never should have used 500 there. It should be in
> terms of OS_TICKS_PER SEC. Some bsps now use 128 ticks per second
> 
> So that is probably it.

To add to Will's answer, if you are dealing with large time values that
may not survive a conversion without overflow, you will probably want to
use the following function:

    int
    os_time_ms_to_ticks(uint32_t ms, uint32_t *out_ticks)

This function returns a nonzero value if the result won't fit in the
destination uint32_t.

Chris

Reply via email to