home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_02_07
/
2n07016a
< prev
next >
Wrap
Text File
|
1991-06-04
|
762b
|
41 lines
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include "ctimer.h"
int OutOfTimers() { return TRUE; }
#include "common.c"
void InitTimerPackage(HANDLE Instance, TIMER_FIRE Func)
{
TD.CallBack = MakeProcInstance(
(FARPROC)&TimerCallBack, Instance);
TD.FireFunc = Func;
}
TIMER *TimerCreate(int EventId)
{
TIMER *Timer = malloc(sizeof(TIMER));
InitTimer(Timer, EventId);
return Timer;
}
void TimerDelete(TIMER *Timer)
{
DeleteTimer(Timer);
free(Timer);
}
int TimerStart(TIMER *Timer, ULONG Interval)
{
return SetInterval(Timer, Interval);
}
void TimerStop(TIMER *Timer)
{
SetInterval(Timer, 0);
}