A class for storing and manipulating times.
More...
#include <arc/DateTime.h>
|
static const int | YEAR = 31536000 |
| Number of seconds in a year (365 days) More...
|
|
static const int | MONTH = 2592000 |
| Number of seconds in 30 days. More...
|
|
static const int | WEEK = 604800 |
| Number of seconds in a week. More...
|
|
static const int | DAY = 86400 |
| Number of seconds in a day. More...
|
|
static const int | HOUR = 3600 |
| Number of seconds in an hour. More...
|
|
static const time_t | UNDEFINED = (time_t)(-1) |
| Undefined time. More...
|
|
A class for storing and manipulating times.
Time represents a moment of time (eg midnight on 1st Jan 2000), whereas Period represents a length of time (eg 2 mins and 30.1 seconds).
- See Also
- Period
Default constructor. The time is put equal the current time.
Arc::Time::Time |
( |
time_t |
| ) |
|
Constructor that takes a time_t variable and stores it.
Arc::Time::Time |
( |
time_t |
time, |
|
|
uint32_t |
nanosec |
|
) |
| |
Constructor that takes a fine grained time variables and stores them.
Arc::Time::Time |
( |
const std::string & |
| ) |
|
Constructor that tries to convert a string into a time_t.
Gets the default format for time strings.
time_t Arc::Time::GetTime |
( |
| ) |
const |
Gets the time in seconds.
time_t Arc::Time::GetTimeNanoseconds |
( |
| ) |
const |
Gets the nanoseconds fraction of the time.
Arc::Time::operator std::string |
( |
| ) |
const |
Returns a string representation of the time, using the default format.
bool Arc::Time::operator!= |
( |
const Time & |
| ) |
const |
Comparing two Time objects.
Time Arc::Time::operator+ |
( |
const Period & |
| ) |
const |
Adding Time object with Period object.
- Java interface deviation
- Renamed to add in Java interface
Time Arc::Time::operator- |
( |
const Period & |
| ) |
const |
Subtracting Period object from Time object.
- Java interface deviation
- Renamed to sub in Java interface
Period Arc::Time::operator- |
( |
const Time & |
| ) |
const |
Subtracting Time object from the other Time object.
- Java interface deviation
- Renamed to sub in Java interface
bool Arc::Time::operator< |
( |
const Time & |
| ) |
const |
Comparing two Time objects.
bool Arc::Time::operator<= |
( |
const Time & |
| ) |
const |
Comparing two Time objects.
Time& Arc::Time::operator= |
( |
time_t |
| ) |
|
Assignment operator from a time_t.
- Python interface deviation
- Method is unavailable in Python interface
- Java interface deviation
- Method is unavailable in Java interface
Time& Arc::Time::operator= |
( |
const Time & |
| ) |
|
Assignment operator from a Time.
- Python interface deviation
- Method is unavailable in Python interface
- Java interface deviation
- Method is unavailable in Java interface
Time& Arc::Time::operator= |
( |
const char * |
| ) |
|
Assignment operator from a char pointer.
- Python interface deviation
- Method is unavailable in Python interface
- Java interface deviation
- Method is unavailable in Java interface
Time& Arc::Time::operator= |
( |
const std::string & |
| ) |
|
Assignment operator from a string.
- Python interface deviation
- Method is unavailable in Python interface
- Java interface deviation
- Method is unavailable in Java interface
bool Arc::Time::operator== |
( |
const Time & |
| ) |
const |
Comparing two Time objects.
bool Arc::Time::operator> |
( |
const Time & |
| ) |
const |
Comparing two Time objects.
bool Arc::Time::operator>= |
( |
const Time & |
| ) |
const |
Comparing two Time objects.
static void Arc::Time::SetFormat |
( |
const TimeFormat & |
| ) |
|
|
static |
Sets the default format for time strings.
void Arc::Time::SetTime |
( |
time_t |
| ) |
|
void Arc::Time::SetTime |
( |
time_t |
time, |
|
|
uint32_t |
nanosec |
|
) |
| |
Sets the fine grained time.
std::string Arc::Time::str |
( |
const TimeFormat & |
= time_format | ) |
const |
Returns a string representation of the time, using the specified format.
const int Arc::Time::DAY = 86400 |
|
static |
Number of seconds in a day.
const int Arc::Time::HOUR = 3600 |
|
static |
Number of seconds in an hour.
const int Arc::Time::MONTH = 2592000 |
|
static |
Number of seconds in 30 days.
const time_t Arc::Time::UNDEFINED = (time_t)(-1) |
|
static |
const int Arc::Time::WEEK = 604800 |
|
static |
Number of seconds in a week.
const int Arc::Time::YEAR = 31536000 |
|
static |
Number of seconds in a year (365 days)
The documentation for this class was generated from the following file: