cisst-saw
Loading...
Searching...
No Matches
osaGetTime.h File Reference

Declaration of osaGetTime. More...

#include <cisstOSAbstraction/osaExport.h>
#include <string>

Go to the source code of this file.

Functions

double CISST_EXPORT osaGetTime (void)
void CISST_EXPORT osaGetDateTimeString (std::string &str, const char delimiter='-')
void CISST_EXPORT osaGetDateTimeString (std::string &str, double time, const char delimiter='-')
void CISST_EXPORT osaGetDateString (std::string &str, double time, const char delimiter=':')
void CISST_EXPORT osaGetTimeString (std::string &str, double time, const char delimiter=':')
void CISST_EXPORT osaGetTimeString (std::string &str)

Detailed Description

Declaration of osaGetTime.

Function Documentation

◆ osaGetDateString()

void CISST_EXPORT osaGetDateString ( std::string & str,
double time,
const char delimiter = ':' )

Convert from (epoch) absolute time in seconds to date (y:m:d) string

◆ osaGetDateTimeString() [1/2]

void CISST_EXPORT osaGetDateTimeString ( std::string & str,
const char delimiter = '-' )

Retrieve the current local date and time.

◆ osaGetDateTimeString() [2/2]

void CISST_EXPORT osaGetDateTimeString ( std::string & str,
double time,
const char delimiter = '-' )

Convert from (epoch) absolute time in seconds to date and time string

◆ osaGetTime()

double CISST_EXPORT osaGetTime ( void )

Return the most accurate time available on the system.

Returns
A double representing time in seconds

◆ osaGetTimeString() [1/2]

void CISST_EXPORT osaGetTimeString ( std::string & str)

Retrieve the current local time.

◆ osaGetTimeString() [2/2]

void CISST_EXPORT osaGetTimeString ( std::string & str,
double time,
const char delimiter = ':' )

Convert from (epoch) absolute time in seconds to time (h:m:s:ms) string