OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::Utils::anonymous_namespace{Time.cpp} Namespace Reference

Functions

struct std::tm * _gmtime_r (const time_t *timep, struct tm *result)
struct std::tm * _localtime_r (const time_t *timep, struct tm *result)
time_t _mktime (const struct std::tm *tms)
time_t _timegm (const struct std::tm *tms)
std::string process_format (const char *fmt, TimeZone zone)

Function Documentation

◆ _gmtime_r()

struct std::tm * Slic3r::Utils::anonymous_namespace{Time.cpp}::_gmtime_r ( const time_t * timep,
struct tm * result )
129{
130 assert(timep != nullptr && result != nullptr);
131#ifdef WIN32
132 time_t t = *timep;
133 gmtime_s(result, &t);
134 return result;
135#else
136 return gmtime_r(timep, result);
137#endif
138}

References _gmtime_r().

Referenced by _gmtime_r().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _localtime_r()

struct std::tm * Slic3r::Utils::anonymous_namespace{Time.cpp}::_localtime_r ( const time_t * timep,
struct tm * result )
141{
142 assert(timep != nullptr && result != nullptr);
143#ifdef WIN32
144 // Converts a time_t time value to a tm structure, and corrects for the
145 // local time zone.
146 time_t t = *timep;
147 localtime_s(result, &t);
148 return result;
149#else
150 return localtime_r(timep, result);
151#endif
152}

References _localtime_r().

Referenced by _localtime_r().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _mktime()

time_t Slic3r::Utils::anonymous_namespace{Time.cpp}::_mktime ( const struct std::tm * tms)
155{
156 assert(tms != nullptr);
157 std::tm _tms = *tms;
158 return mktime(&_tms);
159}

References _mktime().

Referenced by _mktime().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _timegm()

time_t Slic3r::Utils::anonymous_namespace{Time.cpp}::_timegm ( const struct std::tm * tms)
162{
163 std::tm _tms = *tms;
164#ifdef WIN32
165 return _mkgmtime(&_tms);
166#else /* WIN32 */
167 return timegm(&_tms);
168#endif /* WIN32 */
169}

References _timegm().

Referenced by _timegm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_format()

std::string Slic3r::Utils::anonymous_namespace{Time.cpp}::process_format ( const char * fmt,
TimeZone zone )
172{
173 std::string fmtstr(fmt);
174
175 if (fmtstr == SLICER_UTC_TIME_FMT && zone == TimeZone::utc)
176 fmtstr += " UTC";
177
178 return fmtstr;
179}
static const constexpr char *const SLICER_UTC_TIME_FMT
Definition Time.cpp:30
@ utc
Definition Time.hpp:13

References process_format(), Slic3r::Utils::SLICER_UTC_TIME_FMT, and Slic3r::Utils::utc.

Referenced by process_format().

Here is the call graph for this function:
Here is the caller graph for this function: