OSVR-Core
Classes | Public Member Functions | List of all members
osvr::common::LowLatency Class Reference

An object that sets a system for low-latency, but potentially high-CPU-usage, high power, and even lower-performance due to scheduling (see the cautions about timeBeginPeriod). More...

#include <LowLatency.h>

Classes

struct  Impl
 

Public Member Functions

 LowLatency (LowLatency const &)=delete
 
LowLatencyoperator= (LowLatency const &)=delete
 

Detailed Description

An object that sets a system for low-latency, but potentially high-CPU-usage, high power, and even lower-performance due to scheduling (see the cautions about timeBeginPeriod).

Typical usage would be for a class to hold a unique_ptr of this, instantiate a new one only when you need to enter the mode, then reset the pointer when you don't need it any more.

Explanation, by way of implementation detail: On Windows, this requests a change to the Windows global timer frequency with timeBeginPeriod and matching timeEndPeriod. Not polite to leave it on long-term, but "this is VR" so when milliseconds count, it might be OK. Bruce Dawson even says so :) https://randomascii.wordpress.com/2016/03/08/power-wastage-on-an-idle-laptop/#comment-20184


The documentation for this class was generated from the following files: