NvCPUTimer Class Reference

A CPU timer class. More...

#include <NvCPUTimer.h>

List of all members.

Public Member Functions

void init ()
 Initializes the timer. This function must be called after globalInit.
void reset ()
 Resets the elapsed time accumulator to zero.
void start ()
 Starts the timer.
void stop ()
 Stops the timer.
float getScaledCycles ()
 Returns the accumulated time of all completed start/stop cycles since the last reset.
uint32_t getStartStopCycles ()
 Returns the number of times the timer has been started and stopped since reset.

Static Public Member Functions

static void globalInit (NvStopWatchFactory *factory)
 Static initialization to pass the app framework's CPU stopwatch factory object, to be used in the creation of all CPU timers.


Detailed Description

A CPU timer class.

Member Function Documentation

float NvCPUTimer::getScaledCycles (  )  [inline]

Returns the accumulated time of all completed start/stop cycles since the last reset.

Returns:
the accumulated time

uint32_t NvCPUTimer::getStartStopCycles (  )  [inline]

Returns the number of times the timer has been started and stopped since reset.

Returns:
the start/stop count (1 per start/stop pair)

static void NvCPUTimer::globalInit ( NvStopWatchFactory *  factory  )  [inline, static]

Static initialization to pass the app framework's CPU stopwatch factory object, to be used in the creation of all CPU timers.

Parameters:
[in] factory the factory object, likely from the app framework


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