зеркало из https://github.com/mozilla/gecko-dev.git
Bugzilla Bug 277514: added an environment variable NSPR_OS2_NO_HIRES_TIMER
that a user can set to disable the use of high-resolution timer DosTmrQueryTime(). The patch is contributed by Michael Kaply <mkaply@us.ibm.com>. r=wtc.
This commit is contained in:
Родитель
26d59e8fa8
Коммит
9a39af7303
|
@ -50,8 +50,17 @@ PRInt32 _os2_highMask = 0;
|
|||
void
|
||||
_PR_MD_INTERVAL_INIT()
|
||||
{
|
||||
ULONG timerFreq = 0; /* OS/2 high-resolution timer frequency in Hz */
|
||||
APIRET rc = DosTmrQueryFreq(&timerFreq);
|
||||
char *envp;
|
||||
ULONG timerFreq;
|
||||
APIRET rc;
|
||||
|
||||
if ((envp = getenv("NSPR_OS2_NO_HIRES_TIMER")) != NULL) {
|
||||
if (atoi(envp) == 1)
|
||||
return;
|
||||
}
|
||||
|
||||
timerFreq = 0; /* OS/2 high-resolution timer frequency in Hz */
|
||||
rc = DosTmrQueryFreq(&timerFreq);
|
||||
if (NO_ERROR == rc) {
|
||||
useHighResTimer = PR_TRUE;
|
||||
PR_ASSERT(timerFreq != 0);
|
||||
|
|
Загрузка…
Ссылка в новой задаче