MCPcopy Create free account
hub / github.com/crownengine/crown / utc_time

Function utc_time

src/core/date.cpp:79–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77 }
78
79 void utc_time(Time &time)
80 {
81#if CROWN_PLATFORM_WINDOWS
82 SYSTEMTIME now;
83 GetSystemTime(&now);
84 time.hour = now.wHour;
85 time.minutes = now.wMinute;
86 time.seconds = now.wSecond;
87#else
88 time_t t;
89 struct tm now;
90 ::time(&t);
91 gmtime_r(&t, &now);
92 time.hour = now.tm_hour;
93 time.minutes = now.tm_min;
94 time.seconds = now.tm_sec;
95#endif
96 }
97
98 const char *to_string(char *buf, u32 len, const Date &date)
99 {

Callers 1

expandFunction · 0.85

Calls 1

timeFunction · 0.70

Tested by

no test coverage detected