mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@55275 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
ff4c5f9ccf
commit
5b264dd685
@ -3,6 +3,11 @@
|
||||
|
||||
#include "BaseThread.h"
|
||||
|
||||
#ifdef QT_MAC
|
||||
#include "mach/mach.h"
|
||||
#include "mach/mach_time.h"
|
||||
#endif
|
||||
|
||||
namespace NSTimers
|
||||
{
|
||||
static DWORD GetTickCount()
|
||||
@ -10,10 +15,15 @@ namespace NSTimers
|
||||
#if defined(WIN32) || defined(_WIN32_WCE)
|
||||
return ::GetTickCount();
|
||||
#else
|
||||
#ifdef CLOCK_MONOTONIC
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
|
||||
return (ts.tv_sec * 1000 + (DWORD)(ts.tv_nsec / 1000000));
|
||||
#else
|
||||
uint64_t nano = mach_absolute_time();
|
||||
return nano / 1000000;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -72,4 +82,4 @@ namespace NSTimers
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user