util: add time_stamp() implementation for XBOX

Backported from UnrealEngine project.
This commit is contained in:
Dmitry Podgorny
2020-01-07 22:24:10 +02:00
parent 3f05bafffb
commit a811c868ff

View File

@@ -86,7 +86,12 @@ char *xmpp_strtok_r(char *s, const char *delim, char **saveptr)
*/
uint64_t time_stamp(void)
{
#ifdef _WIN32
#if defined(_XBOX_ONE)
uint64_t SystemTime;
GetSystemTimeAsFileTime((FILETIME*)&SystemTime);
/* Convert 100 nanosec ticks to milliseconds */
return (SystemTime / 10000);
#elif defined(_WIN32)
return timeGetTime();
#else
struct timeval tv;