vengine  0.1.0
3D graphics engine made with Vulkan
Loading...
Searching...
No Matches
myLib::Time Class Reference

Class used for time management. More...

#include <Time.hpp>

+ Collaboration diagram for myLib::Time:

Public Member Functions

 Time (const double seconds)
 Construct a new Time object.
 
int asSeconds () const
 Transform the time to seconds.
 
int asMilliseconds () const
 Transform the time to milliseconds.
 
int asMicroseconds () const
 Transform the time to microseconds.
 

Private Attributes

double m_seconds {0.0F}
 

Detailed Description

Class used for time management.

Definition at line 15 of file Time.hpp.

Constructor & Destructor Documentation

◆ Time()

myLib::Time::Time ( const double seconds)
inlineexplicit

Construct a new Time object.

Definition at line 22 of file Time.hpp.

Member Function Documentation

◆ asMicroseconds()

int myLib::Time::asMicroseconds ( ) const
inlinenodiscard

Transform the time to microseconds.

Returns
int The time in microseconds

Definition at line 40 of file Time.hpp.

References m_seconds.

◆ asMilliseconds()

int myLib::Time::asMilliseconds ( ) const
inlinenodiscard

Transform the time to milliseconds.

Returns
int The time in milliseconds

Definition at line 34 of file Time.hpp.

References m_seconds.

◆ asSeconds()

int myLib::Time::asSeconds ( ) const
inlinenodiscard

Transform the time to seconds.

Returns
int The time in seconds

Definition at line 28 of file Time.hpp.

References m_seconds.

Member Data Documentation

◆ m_seconds

double myLib::Time::m_seconds {0.0F}
private

Definition at line 47 of file Time.hpp.

Referenced by asMicroseconds(), asMilliseconds(), and asSeconds().


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