Nui Engine
A game engine framework
Loading...
Searching...
No Matches
Nui::Timestamp Class Reference

Timestamp utility class, wraps chrono::system_clock::time_point. More...

#include <Timestamp.h>

Public Types

using ClockType = chrono::system_clock
 
using TimePoint = ClockType::time_point
 

Public Member Functions

 Timestamp ()
 Default constructor, sets timestamp to current time.
 
 Timestamp (const TimePoint &point)
 Constructor, sets timestamp to specified time.
 
String GetDateAndTime () const
 Get formatted date and time (Format: "YYYY-MM-DD HH:MM:SS`")
 
String GetDate () const
 Get formatted date (Format: "YYYY-MM-DD")
 
String GetTime () const
 Get formatted time (Format: "HH:MM:SS")
 
 operator TimePoint () const
 Implicitly convert timestamp to time point.
 

Detailed Description

Timestamp utility class, wraps chrono::system_clock::time_point.

Member Function Documentation

◆ GetDate()

String Nui::Timestamp::GetDate ( ) const
inline

Get formatted date (Format: "YYYY-MM-DD")

Returns
Formatted date

◆ GetDateAndTime()

String Nui::Timestamp::GetDateAndTime ( ) const
inline

Get formatted date and time (Format: "YYYY-MM-DD HH:MM:SS`")

Returns
Formatted date and time

◆ GetTime()

String Nui::Timestamp::GetTime ( ) const
inline

Get formatted time (Format: "HH:MM:SS")

Returns
Formatted time

◆ operator TimePoint()

Nui::Timestamp::operator TimePoint ( ) const
inline

Implicitly convert timestamp to time point.

Returns
Time point

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