TickConvertToMilliseconds Function

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
TickConvertToMilliseconds Function
C
DWORD TickConvertToMilliseconds(
    DWORD dwTickValue
);
Description

This function converts a Tick value or difference to milliseconds. For example, TickConvertToMilliseconds(32768) returns 1000 when a 32.768kHz clock with no prescaler drives the Tick module interrupt.

Preconditions

None

Parameters
Parameters 
Description 
dwTickValue 
Value to convert to milliseconds 
Returns

Input value expressed in milliseconds.

Remarks

This function performs division on DWORDs, which is slow. Avoid using it unless you absolutely must (such as displaying data to a user). For timeout comparisons, compare the current value to a multiple or fraction of TICK_SECOND, which will be calculated only once at compile time.

Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.