util: add time_stamp() implementation for XBOX
Backported from UnrealEngine project.
This commit is contained in:
@@ -86,7 +86,12 @@ char *xmpp_strtok_r(char *s, const char *delim, char **saveptr)
|
|||||||
*/
|
*/
|
||||||
uint64_t time_stamp(void)
|
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();
|
return timeGetTime();
|
||||||
#else
|
#else
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|||||||
Reference in New Issue
Block a user