Loading...
Searching...
No Matches
stdex::chrono::aosn_timestamp Struct Reference

AOsn timestamp. More...

`#include <stdex/chrono.hpp>`

## Public Types

using | rep = int64_t
using | period = std::ratio< 1, 1 '000 '000 >
using | duration = std::chrono::duration< rep, period >
using | time_point = std::chrono::time_point< aosn_timestamp >

## Static Public Member Functions

static time_point | now () noexcept
| Gets current timestamp.
static std::time_t | to_time_t (const time_point tp) noexcept
| Returns time_t from time point.
static time_point | from_time_t (std::time_t t) noexcept
| Returns time point from time_t.
static time_point | from_system (const struct timespec &t) noexcept
| Returns time point from struct timespec.
static void | to_system (time_point tp, struct tm &date) noexcept
static aosn_date::time_point | to_date (time_point tp) noexcept
| Returns aosn_date::time_point from time point.
static time_point | from_date (aosn_date::time_point date) noexcept
| Returns time point from aosn_date::time_point.
static time_point | from_dmy (uint8_t day, uint8_t month, int32_t year, uint8_t hour, uint8_t minute, uint8_t second, uint16_t millisecond) noexcept
| Returns time point from calendar day, month, year and time.
static void | to_dmy (const time_point tp, uint8_t *day, uint8_t *month, int32_t *year, uint8_t *hour, uint8_t *minute, uint8_t *second, uint16_t *millisecond) noexcept
| Returns calendar day, month, year and time from time point.
template<class _Traits = std::char_traits<char>, class _Ax = std::allocator<char>>
static std::basic_string< char, _Traits, _Ax > | to_str (const time_point tp, const char *format, locale_t locale)
template<class _Traits = std::char_traits<wchar_t>, class _Ax = std::allocator<wchar_t>>
static std::basic_string< wchar_t, _Traits, _Ax > | to_str (const time_point tp, const wchar_t *format, locale_t locale)
template<class _Traits = std::char_traits<char>, class _Ax = std::allocator<char>>
static std::basic_string< char, _Traits, _Ax > | to_rfc822 (const time_point tp)

## Static Public Attributes

static constexpr bool | is_steady = false
static constexpr rep | f_second = 1000
static constexpr rep | f_minute = 60
static constexpr rep | f_hour = 60
static constexpr rep | f_day = 24
static constexpr rep | f_week = 7
static constexpr rep | one_second = f_second
static constexpr rep | one_minute = f_minute * one_second
static constexpr rep | one_hour = f_hour * one_minute
static constexpr rep | one_day = f_day * one_hour
static constexpr rep | one_week = f_week * one_day

## Detailed Description

AOsn timestamp.

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

- include/stdex/chrono.hpp