1#ifndef SAFEHERON_SGX_TRUSTED_TIME_H
2#define SAFEHERON_SGX_TRUSTED_TIME_H
36 TimeSpan(int64_t num_days,
int num_hours,
int num_mins,
int num_secs) noexcept;
50 [[nodiscard]] int64_t
GetDays() const noexcept;
78 [[nodiscard]] int64_t
GetHours() const noexcept;
155 DateTime(
int num_year,
int num_month,
int num_day,
int num_hour,
int num_min,
int num_sec);
174 [[nodiscard]] time_t GetTimestamp() const noexcept;
175 [[nodiscard]]
int GetYear() const noexcept;
176 [[nodiscard]]
int GetMonth() const noexcept;
177 [[nodiscard]]
int GetDay() const noexcept;
178 [[nodiscard]]
int GetHour() const noexcept;
179 [[nodiscard]]
int GetMinute() const noexcept;
180 [[nodiscard]]
int GetSecond() const noexcept;
181 [[nodiscard]]
int GetDayOfWeek() const noexcept;
189 [[nodiscard]] std::
string ToFormatTime() const;
Represents a specific point in time. Supports UTC/GMT time only.
Definition ssgx_utils_t_time.h:114
static DateTime FromFormatTime(const std::string &formattedTime)
Constructs a DateTime object from a formatted string. Supports the format "YYYY-MM-DD HH:MM:SS".
DateTime() noexcept
Default constructor, initializes the time to epoch (1970-01-01 00:00:00).
static DateTime Now()
Returns the current system time as a DateTime object.
Provides high-resolution time utilities for nanoseconds and milliseconds.
Definition ssgx_utils_t_time.h:199
static int64_t NowInMilliseconds()
Returns the current time in milliseconds since the UNIX epoch.
static int64_t NowInNanoseconds()
Returns the current time in nanoseconds since the UNIX epoch.
Represents a span of time, providing utility functions for calculating days, hours,...
Definition ssgx_utils_t_time.h:15
int64_t GetTotalMinutes() const noexcept
Returns the total number of minutes in the time span.
int64_t GetTotalHours() const noexcept
Returns the total number of hours in the time span.
int64_t GetTotalSeconds() const noexcept
Returns the total number of seconds in the time span.
int64_t GetSeconds() const noexcept
Returns the remaining seconds after extracting minutes.
TimeSpan() noexcept
Default constructor, initializes the time span to 0.
int64_t GetMinutes() const noexcept
Returns the remaining minutes after extracting hours.
int64_t GetHours() const noexcept
Returns the remaining hours after extracting days.
time_t GetTimeSpan() const noexcept
Returns the total time span in seconds.
int64_t GetDays() const noexcept
Returns the number of days in the time span.
Definition ssgx_attestation_t.h:6