LibUsbDotNet 2.2.8
GetNextTimeout Method (sessionHandle, tv)
Library ReferenceMonoLibUsbMonoUsbApiGetNextTimeout(MonoUsbSessionHandle, UnixNativeTimeval%)
LibUsbDotNet on SourceForge
Determine the next internal timeout that libusb needs to handle.
Declaration Syntax
C#Visual BasicVisual C++
public static int GetNextTimeout(
	MonoUsbSessionHandle sessionHandle,
	ref UnixNativeTimeval tv
Public Shared Function GetNextTimeout ( _
	sessionHandle As MonoUsbSessionHandle, _
	ByRef tv As UnixNativeTimeval _
) As Integer
static int GetNextTimeout(
	[InAttribute] MonoUsbSessionHandle^ sessionHandle, 
	UnixNativeTimeval% tv
sessionHandle (MonoUsbSessionHandle)
A valid MonoUsbSessionHandle.
tv (UnixNativeTimeval%)
The maximum time to block waiting for events, or zero for non-blocking mode
Return Value
0 if there are no pending timeouts, 1 if a timeout was returned, or ErrorOther on failure.

You only need to use this function if you are calling poll() or select() or similar on libusb's file descriptors yourself - you do not need to use it if you are calling libusb_handle_events or a variant directly.

You should call this function in your main loop in order to determine how long to wait for select() or poll() to return results. libusb needs to be called into at this timeout, so you should use it as an upper bound on your select() or poll() call.

When the timeout has expired, call into libusb_handle_events_timeout (perhaps in non-blocking mode) so that libusb can handle the timeout.

This function may return 1 (success) and an all-zero timeval. If this is the case, it indicates that libusb has a timeout that has already expired so you should call libusb_handle_events_timeout or similar immediately. A return code of 0 indicates that there are no pending timeouts.

On some platforms, this function will always returns 0 (no pending timeouts). See Notes on time-based events.

Note: Member documentation was originally generated using the Libusb-1.0 API documentation: Polling and timing

Assembly: LibUsbDotNet (Module: LibUsbDotNet) Version: (