RenderManAPI  24.0
RixTimer Class Referenceabstract

NOTE: This interface will be deprecated when a new interface comes in the next release Interface for sampling a high-resolution representation of the current time. More...

#include <RixInterfaces.h>

Inherits RixInterface.

Public Types

enum  Type {
  k_Float, k_Integer, k_StringV, k_Color,
  k_Normal, k_Vector, k_Point, k_HPoint,
  k_MPoint, k_Matrix
}
 

Public Member Functions

virtual uint64_t SampleTime ()=0
 Return a high resolution time sample. More...
 
virtual float ConvertIntervalToSeconds (uint64_t interval)=0
 Convert a high res time interval to seconds of time. More...
 
virtual int GetVersion () const
 Get the version number of this interface. More...
 

Protected Member Functions

 RixTimer ()
 

Protected Attributes

int m_version
 Version number of this interface. More...
 

Detailed Description

NOTE: This interface will be deprecated when a new interface comes in the next release Interface for sampling a high-resolution representation of the current time.

Primarily useful for statistics gathering of timing information for plugins that operate within the renderer. In a multicore environment time sampling is a little challenging and can incur overhead. To support multithreaded operation ( i.e.for RixShadingPlugins, procprims, rifs), the standard idiom is to measure the time differential across a single code execution block. The value should be stored in a per-thread (lockless) context then summed across threads when a total is required. Note, these totals can exceed "user time".

Member Enumeration Documentation

◆ Type

enum RixInterface::Type
inherited
Enumerator
k_Float 
k_Integer 
k_StringV 
k_Color 
k_Normal 
k_Vector 
k_Point 
k_HPoint 
k_MPoint 
k_Matrix 

Constructor & Destructor Documentation

◆ RixTimer()

RixTimer::RixTimer ( )
inlineprotected

Member Function Documentation

◆ ConvertIntervalToSeconds()

virtual float RixTimer::ConvertIntervalToSeconds ( uint64_t  interval)
pure virtual

Convert a high res time interval to seconds of time.

◆ GetVersion()

virtual int RixInterface::GetVersion ( ) const
inlinevirtualinherited

Get the version number of this interface.

Different interfaces might have different version numbers in a given release.

References RixInterface::m_version.

◆ SampleTime()

virtual uint64_t RixTimer::SampleTime ( )
pure virtual

Return a high resolution time sample.

Member Data Documentation

◆ m_version

int RixInterface::m_version
protectedinherited

Version number of this interface.

Referenced by RixInterface::GetVersion().


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