RtSetThreadTimeQuantumEx

RtSetThreadTimeQuantumEx sets the time quantum, in microseconds, for the specified thread.

NOTE: This function is deprecated and will be removed from a future release. Use RtSetTimeQuantum.

Syntax

BOOL RtSetThreadTimeQuantumEx(
    HANDLE hThread,
    ULONG64 ulQuantumInUS
);

Parameters

hThread

The handle of the thread whose time quantum is to be set.

ulQuantumInUS

A new time quantum value in microseconds. The amount of time the thread will run before it yields to another RTSS thread with the same priority.

Return Value

TRUE if the function succeeds, FALSE if the function fails

To get extended information, call GetLastError.

Remarks

In an RTSS environment, the time quantum can be any value greater than or equal to zero. A value of zero means the RTSS thread will run to completion.

The default time quantum value can be changed in the Control Panel.

If the thread time quantum value is less than the HAL timer period, RTX64 will set the interval to the same value as the HAL timer period. If the thread time quantum interval is greater than the HAL timer period, RTX64 will modulo up the HAL timer period. The thread time quantum interval must be a multiple of the HAL timer period.

For Example:

When the HAL Timer Period is configured for 100 microseconds:

Requirements

Minimum Supported Version RTX64 3.0
Header RtssApi.h
Library Rtx_Rtss.lib

See Also:

RtGetThreadTimeQuantum

RtGetThreadTimeQuantumEx

RtSetThreadTimeQuantum