sgltk 0.6
Simple OpenGL Tool Kit
Loading...
Searching...
No Matches
sgltk::Timer Class Reference

Provides a simple timer. More...

#include <timer.h>

Public Member Functions

void start ()
 Starts the timer.
double get_time_s ()
 Returns the time in seconds since the timer was started.
double get_time_ms ()
 Returns the time in milliseconds since the timer was started.

Detailed Description

Provides a simple timer.

Definition at line 12 of file timer.h.

Constructor & Destructor Documentation

◆ Timer()

Timer::Timer ( )

Definition at line 5 of file timer.cpp.

◆ ~Timer()

Timer::~Timer ( )

Definition at line 9 of file timer.cpp.

Member Function Documentation

◆ get_time_ms()

double Timer::get_time_ms ( )

Returns the time in milliseconds since the timer was started.

Returns
Time in milliseconds that has passed since start was called

Definition at line 24 of file timer.cpp.

◆ get_time_s()

double Timer::get_time_s ( )

Returns the time in seconds since the timer was started.

Returns
Time in seconds that has passed since start was called

Definition at line 16 of file timer.cpp.

◆ start()

void Timer::start ( )

Starts the timer.

Definition at line 12 of file timer.cpp.


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