SimpleGL  1.1.0
A framework for platform independent rendering
Static Public Member Functions | List of all members
sgl::TimeUtil Class Reference

This class contains static methods for time calculations. More...

#include <application.hpp>

Static Public Member Functions

static void init ()
 Initializes the time utility. More...
 
static double getTime ()
 Returns the application time in seconds. More...
 
static float getDelta ()
 Returns the time that have passed since the last loop. More...
 
static void update ()
 Updates FPS and UPS if a whole second has passed. More...
 
static void incFPS ()
 Increments the FPS counter by one. More...
 
static void incUPS ()
 Increments the UPS counter by one. More...
 
static int getFPS ()
 Returns the current frames per second. More...
 
static int getUPS ()
 Returns the current updates per second. More...
 
static double getLastLoopTime ()
 Returns the last loop time. More...
 

Detailed Description

This class contains static methods for time calculations.

Definition at line 89 of file application.hpp.

Member Function Documentation

float sgl::TimeUtil::getDelta ( )
static

Returns the time that have passed since the last loop.

Returns
The delta time.

Definition at line 113 of file application.cpp.

int sgl::TimeUtil::getFPS ( )
static

Returns the current frames per second.

Returns
The current FPS.

Definition at line 149 of file application.cpp.

double sgl::TimeUtil::getLastLoopTime ( )
static

Returns the last loop time.

Returns
The last loop time.

Definition at line 159 of file application.cpp.

double sgl::TimeUtil::getTime ( )
static

Returns the application time in seconds.

Returns
The application time.

Definition at line 109 of file application.cpp.

int sgl::TimeUtil::getUPS ( )
static

Returns the current updates per second.

Returns
The current UPS.

Definition at line 154 of file application.cpp.

void sgl::TimeUtil::incFPS ( )
static

Increments the FPS counter by one.

Definition at line 141 of file application.cpp.

void sgl::TimeUtil::incUPS ( )
static

Increments the UPS counter by one.

Definition at line 145 of file application.cpp.

void sgl::TimeUtil::init ( )
static

Initializes the time utility.

Definition at line 105 of file application.cpp.

void sgl::TimeUtil::update ( )
static

Updates FPS and UPS if a whole second has passed.

Definition at line 125 of file application.cpp.


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