Ignore:
Timestamp:
Dec 16, 2000, 10:09:53 PM (25 years ago)
Author:
umoeller
Message:

Miscellanous updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/timer.c

    r15 r17  
    7373#define INCL_DOSMISC
    7474#define INCL_DOSERRORS
     75
     76#define INCL_WINMESSAGEMGR
    7577#include <os2.h>
    7678
     
    151153    }
    152154    else
    153         brc = (DosRequestMutexSem(G_hmtxTimers, SEM_INDEFINITE_WAIT)
     155        brc = (WinRequestMutexSem(G_hmtxTimers, SEM_INDEFINITE_WAIT)
    154156                    == NO_ERROR);
    155157    return (brc);
     
    164166{
    165167    DosReleaseMutexSem(G_hmtxTimers);
    166 }
    167 
    168 /*
    169  *@@ tmrOnKill:
    170  *      on-kill proc for exception handlers.
    171  *
    172  *@@added V0.9.7 (2000-12-09) [umoeller]
    173  */
    174 
    175 VOID APIENTRY tmrOnKill(PEXCEPTIONREGISTRATIONRECORD2 pRegRec2)
    176 {
    177     DosBeep(500, 500);
    178     UnlockTimers();
    179168}
    180169
     
    217206        ULONG ulNesting = 0;
    218207
     208        ULONG ulTimeNow;
     209
    219210        DosSleep(ulInterval);
    220211
     
    225216        ulInterval = 100;
    226217
     218        DosEnterMustComplete(&ulNesting);
     219
    227220        TRY_LOUD(excpt1)
    228221        {
    229             DosEnterMustComplete(&ulNesting);
    230 
    231222            fLocked = LockTimers();
    232223            if (fLocked)
     
    244235                    // we have timers:
    245236                    BOOL      fFoundInvalid = FALSE;
     237
     238                    // get current time
     239                    DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT,
     240                                    &ulTimeNow, sizeof(ulTimeNow));
     241
    246242                    while (pTimerNode)
    247243                    {
    248244                        PXTIMER pTimer = (PXTIMER)pTimerNode->pItemData;
    249                         ULONG ulTimeNow;
    250                         DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT,
    251                                         &ulTimeNow, sizeof(ulTimeNow));
    252245
    253246                        if (pTimer->ulNextFire < ulTimeNow)
Note: See TracChangeset for help on using the changeset viewer.