USB Library
USBGetTicksSinceSuspendEnd Function
Syntax
uint8_t USBGetTicksSinceSuspendEnd();
Description

This function retrieves a 8-bit unsigned byte that represents the number of milliseconds that have elapsed since the end of a USB suspend event. The value saturates at 255.

Preconditions

This function should be called only after USBDeviceInit() has been called (at least once at the start of the application).

Remarks

This function does not increment during USB suspend conditions, or when the USB cable is detached from the host. Prior to calling USBDeviceInit() for the first time the returned value will be unpredictable. 

This function is USB_INTERRUPT mode safe and may be called from main loop code without risk of retrieving a partially updated 32-bit number. 

However, this value only increments when the USBDeviceTasks() function is allowed to execute. If USB_INTERRUPT mode is used, it is allowable to block on this function. If however USB_POLLING mode is used, one must not block on this function without also calling USBDeviceTasks() continuously for the blocking duration (since the USB stack must still be allowed to execute, and the USB stack is also responsible for updating the tick counter internally).

MLA - USB Library Help Version : 2.16
http://www.microchip.com/mla