Note: This call is deprecated. You should consider using CreateRtAlarm instead.
Creates a low-level event object which the alarm triggers. You can program the alarm for either a one-shot or repeating mode, and program the interval with the system timer tick resolution.
KNHANDLE knCreateRtAlarmEvent(
LPVOID lpAlarmEventArea, // area of memory to hold alarm state information
DWORD dwAlarmFlags, // alarm flags
DWORD dwKernelTicks // alarm time interval, in system timer ticks
);
Parameters
lpAlarmEventArea
- Pointer to the area that contains the alarm state information. Must be at least
KN_ALARM_EVENT_SIZE
bytes long.
dwAlarmFlags
- Attributes of the alarm. The relevant field is masked with the value
ALARM_REPETITION_MASK
, which specifies whether the alarm generates a single event signal or repeated event signals. The relevant values for this field include:
KN_SINGLE_SHOT |
Generates a single alarm event. This alarm is inactive after the initial time interval elapses. You must reset it for reuse (see knResetRtAlarmEvent). |
KN_REPEATER |
Generates repeated alarm events. This alarm resets after each generated event of the handler, causing the event to occur again after the next interval elapses. Repetitive alarms generate periodic events until explicitly deleted. |
dwKernelTicks
- Time in system timer ticks until the alarm triggers. Relevant values are:
0 or 1 |
The alarm event is signaled on the next system timer tick, and for repetitive alarms, on every system timer tick. Only the remainder of the current system timer tick elapses, not necessarily one full clock tick. (The value 0 is treated the same as 1.) |
>1 |
The event is signaled after (t - 1) system timer ticks. If you set the value 5 and only half a tick currently remains, the alarm is called after 4-1/2 clock intervals. |
Return Values
Returns the kernel handle for the alarm event.
Requirements
Versions |
Defined in |
Include |
Link to |
INtime 3.0 |
intime/rt/include/rtbase.h |
rt.h |
rt.lib |
See Also
Time management system calls, knResetRtAlarmEvent