libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
introvirt::windows::WindowsTime Class Referencefinal

Helper class for the Windows time format. More...

#include <WindowsTime.hh>

Public Member Functions

uint64_t windows_time () const
 
 operator uint64_t () const
 
uint64_t unix_time () const
 
std::string string () const
 
 WindowsTime (const WindowsTime &other)
 Copy constructor.
 
WindowsTimeoperator= (const WindowsTime &other)
 Copy assignment operator.
 
 WindowsTime (WindowsTime &&other) noexcept
 Move constructor.
 
WindowsTimeoperator= (WindowsTime &&other) noexcept
 Move assignment operator.
 
 ~WindowsTime ()=default
 

Static Public Member Functions

static WindowsTime from_windows_time (uint64_t winTime)
 
static WindowsTime from_unix_time (uint64_t unixTime)
 

Detailed Description

Helper class for the Windows time format.

Windows uses times based on nanoseconds since January 1, 1601. This class provides conversion to and from UNIX time.

Note that times will be in UTC

Constructor & Destructor Documentation

◆ WindowsTime() [1/2]

introvirt::windows::WindowsTime::WindowsTime ( const WindowsTime other)

Copy constructor.

◆ WindowsTime() [2/2]

introvirt::windows::WindowsTime::WindowsTime ( WindowsTime &&  other)
noexcept

Move constructor.

◆ ~WindowsTime()

introvirt::windows::WindowsTime::~WindowsTime ( )
default

Member Function Documentation

◆ from_unix_time()

static WindowsTime introvirt::windows::WindowsTime::from_unix_time ( uint64_t  unixTime)
static

Create a WindowsTime object from UNIX format

Parameters
unixTimeThe UNIX time value
Returns
A WindowsTime object

◆ from_windows_time()

static WindowsTime introvirt::windows::WindowsTime::from_windows_time ( uint64_t  winTime)
static

Create a WindowsTime object directly from Windows format

Parameters
winTimeThe Windows time value
Returns
A WindowsTime object

◆ operator uint64_t()

introvirt::windows::WindowsTime::operator uint64_t ( ) const

◆ operator=() [1/2]

WindowsTime & introvirt::windows::WindowsTime::operator= ( const WindowsTime other)

Copy assignment operator.

◆ operator=() [2/2]

WindowsTime & introvirt::windows::WindowsTime::operator= ( WindowsTime &&  other)
noexcept

Move assignment operator.

◆ string()

std::string introvirt::windows::WindowsTime::string ( ) const
Returns
A human readable time string

◆ unix_time()

uint64_t introvirt::windows::WindowsTime::unix_time ( ) const
Returns
The time value in UNIX time

◆ windows_time()

uint64_t introvirt::windows::WindowsTime::windows_time ( ) const
Returns
The time value in Windows time

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