Share via


IGameInputDispatcher::Dispatch (v2)

Executes work in the dispatcher's queue.

Syntax

bool Dispatch(
    uint64_t quotaInMicroseconds
);

Parameters

quotaInMicroseconds   _In_
Type: uint64_t

The amount of time that the dispatcher has to execute tasks. The dispatcher will attempt to keep processing time within the provided duration, but this is not a guaranteed limit.

Return value

Type: bool

Returns true if work items are pending in the dispatcher's queue. Returns false if no work items remain. Returns at the time that the queue is flushed.

Remarks

The IGameInputDispatcher::Dispatch executes work in the dispatcher's queue. This method flushes at least one item from the queue even if the quotaInMicroseconds parameter is set to zero. You can call with a quota time of zero to execute a single item and then decide whether to dispatch more items depending on the time elapsed. For intermediate and advanced use-cases of the GameInput API, see Advanced GameInput topics.

Requirements

Header: GameInput.h

Library: gameinput.lib

Supported platforms: Windows

See also

Overview of GameInput IGameInputDispatcher