MT Core (C++)
Core library for replacing C++ standard in project usage
Loading...
Searching...
No Matches
time.hpp File Reference
#include "mtcore.hpp"
Include dependency graph for calendars/mtcore_calendars/time.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mtcore::calendars::Segments
 Represents time in segments (hour, minute, etc.). More...
 
struct  mtcore::calendars::DayFraction
 
struct  mtcore::calendars::NanoSeconds
 
struct  mtcore::io::Formatter< calendars::NanoSeconds >
 
struct  mtcore::io::Formatter< calendars::DayFraction >
 
struct  mtcore::io::Formatter< calendars::Segments >
 

Namespaces

namespace  mtcore
 Core library for C++ with Zig-related functionality.
 
namespace  mtcore::calendars
 Namespace for calendaring systems.
 
namespace  mtcore::io
 

Macros

#define MTCORE_CAL_TIME_SEG_FMT_TRY_WRITE(FMTSTR, VAL)
 

Enumerations

enum class  mtcore::calendars::TimeValidationError {
  mtcore::calendars::TimeValidationError::INVALID_HOUR , mtcore::calendars::TimeValidationError::INVALID_MINUTE , mtcore::calendars::TimeValidationError::INVALID_SECOND , mtcore::calendars::TimeValidationError::INVALID_NANOSECOND ,
  mtcore::calendars::TimeValidationError::INVALID_FRACTION
}
 Common try_validate errors for time. More...
 

Variables

constexpr i32 mtcore::calendars::NANOS_PER_SECOND = 1e9
 Number of nanoseconds per second.
 
constexpr i64 mtcore::calendars::NANOS_PER_DAY = static_cast<i64>(NANOS_PER_SECOND) * 60 * 60 * 24
 Number of nanoseconds per day.
 

Macro Definition Documentation

◆ MTCORE_CAL_TIME_SEG_FMT_TRY_WRITE

#define MTCORE_CAL_TIME_SEG_FMT_TRY_WRITE ( FMTSTR,
VAL )
Value:
if (auto r = io::print(writer, (FMTSTR), (VAL)); r.is_error()) { \
return r.error(); \
} \
else { \
written += r.value(); \
}