IPresentationManager::SetPreferredPresentDuration method (presentation.h)

Sets the preferred frame duration.

Syntax

HRESULT SetPreferredPresentDuration(
  SystemInterruptTime preferredDuration,
  SystemInterruptTime deviationTolerance
);

Parameters

preferredDuration

Type: SystemInterruptTime

The requested duration, in interrupt time.

deviationTolerance

Type: SystemInterruptTime

The allowed tolerance. If the magnitude of the difference between a supported system duration and the preferredDuration parameter is within the deviationTolerance parameter, that system duration will be used.

Return value

Type: HRESULT

If the function succeeds, it returns S_OK; otherwise, it returns an HRESULT value that indicates the error.

Remarks

Preferred frame duration is meant to be used as a hint to the system that it would be preferred to refresh the output at the specified framerate. Displays that support this rate, or a multiple, will be set into that mode if appropriate.

This parameter setting persists across presents.

Requirements

   
Minimum supported client Windows Build 22000
Minimum supported server Windows Build 22000
Header presentation.h
Library dcomp.lib
DLL dcomp.dll