Kanzi Graphics Engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
kzc_stopwatch.h File Reference

Stopwatch. More...

Data Structures

struct  KzcStopwatch
 Stopwatch structure to time spans. More...
 

Macros

#define kzcStopwatchIsRunning(stopwatch_param)
 Is the stopwatch running. More...
 

Enumerations

enum  KzcStopwatchState { KZC_STOPWATCH_INITIALIZED, KZC_STOPWATCH_RUNNING, KZC_STOPWATCH_STOPPED }
 State of stopwatch. More...
 

Functions

struct KzcStopwatch kzcStopwatchInitialize (void)
 Init stopwatch. More...
 
void kzcStopwatchStart (struct KzcStopwatch *stopwatch)
 Start stopwatch. More...
 
void kzcStopwatchStop (struct KzcStopwatch *stopwatch)
 Stops stopwatch. More...
 
kzUint kzcStopwatchGetCurrentTime (const struct KzcStopwatch *stopwatch)
 Get current time running in the stopwatch. More...
 
kzUint kzcStopwatchGetDuration (const struct KzcStopwatch *stopwatch)
 Get duration of last interval. More...
 
kzUint kzcStopwatchSampleDeltaTime (struct KzcStopwatch *stopwatch)
 Get difference from previous call to kzcStopwatchStart or kzcStopwatchSampleDeltaTime, whichever was called later. More...
 

Detailed Description

Stopwatch.

Usage: 1) initialize 2) start 3) stop

To reuse stopwatch, initialize it after use.

Copyright 2008-2019 by Rightware. All rights reserved.

Macro Definition Documentation

#define kzcStopwatchIsRunning (   stopwatch_param)

Is the stopwatch running.

Enumeration Type Documentation

State of stopwatch.

Enumerator
KZC_STOPWATCH_INITIALIZED 

Stopwatch is initialized but not started.

KZC_STOPWATCH_RUNNING 

Stopwatch is running.

KZC_STOPWATCH_STOPPED 

Stopwatch has been stopped.

Function Documentation

struct KzcStopwatch kzcStopwatchInitialize ( void  )

Init stopwatch.

Begin all loops with call to this.

void kzcStopwatchStart ( struct KzcStopwatch stopwatch)

Start stopwatch.

void kzcStopwatchStop ( struct KzcStopwatch stopwatch)

Stops stopwatch.

kzUint kzcStopwatchGetCurrentTime ( const struct KzcStopwatch stopwatch)

Get current time running in the stopwatch.

Doesn't stop it.

kzUint kzcStopwatchGetDuration ( const struct KzcStopwatch stopwatch)

Get duration of last interval.

If between start and stop result is undefined.

kzUint kzcStopwatchSampleDeltaTime ( struct KzcStopwatch stopwatch)

Get difference from previous call to kzcStopwatchStart or kzcStopwatchSampleDeltaTime, whichever was called later.