mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.0 KiB
62 lines
1.0 KiB
/*++
|
|
|
|
Copyright (c) 1992 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
timer.h
|
|
|
|
Abstract:
|
|
|
|
This module contains routines to schedule timer events.
|
|
|
|
Author:
|
|
|
|
Jameel Hyder ([email protected])
|
|
|
|
Revision History:
|
|
Jul 1996 Initial Version
|
|
|
|
Notes: Tab stop: 4
|
|
--*/
|
|
|
|
#ifndef _TIMER_
|
|
#define _TIMER_
|
|
|
|
struct _Timer;
|
|
|
|
typedef
|
|
BOOLEAN
|
|
(*TIMER_ROUTINE)(
|
|
IN struct _IntF * pIntF,
|
|
IN struct _Timer * pTimer,
|
|
IN BOOLEAN TimerShuttingDown
|
|
);
|
|
|
|
typedef struct _Timer
|
|
{
|
|
struct _Timer * Next;
|
|
struct _Timer ** Prev;
|
|
TIMER_ROUTINE Routine; // Timer routine
|
|
SHORT AbsTime; // Absolute time, for re-enqueue
|
|
SHORT RelDelta; // Relative to the previous entry
|
|
} TIMER, *PTIMER;
|
|
|
|
|
|
#define ArpSTimerInitialize(pTimer, TimerRoutine, DeltaTime) \
|
|
{ \
|
|
(pTimer)->Routine = TimerRoutine; \
|
|
(pTimer)->AbsTime = DeltaTime; \
|
|
}
|
|
|
|
#define ArpSGetCurrentTick() ArpSTimerCurrentTick
|
|
|
|
// Keep this at 15 sec units
|
|
#define MULTIPLIER 4 // To convert minutes to ticks
|
|
#define TIMER_TICK -15*10000000L // 15s in 100ns units
|
|
|
|
#endif // _TIMER_
|
|
|
|
|
|
|
|
|