1. KeWaitForSingleOb ject
NTSTATUS
KeWaitForSingleObject(
IN PVOID Object, //初始化的对象
IN KWAIT_REASON WaitReason, //Specifies the reason for the wait
IN KPROCESSOR_MODE WaitMode, //KernelMode
IN BOOLEAN Alertable, /Where possible, Alertable should be set to FALSE and WaitMode should be set to KernelMode
IN PLARGE_INTEGER Timeout OPTIONAL //等待的时间
);
2.KeDelayExecutionThread
NTSTATUS
KeDelayExecutionThread(
IN KPROCESSOR_MODE WaitMode, //KernelMode
IN BOOLEAN Alertable, //FALSE
IN PLARGE_INTEGER Interval //等待时间
);
3.KeStallExecutionProcessor
KeStallExecutionProcessor(
IN ULONG MicroSeconds //等待时间
);
让CPU处于忙碌状态,这种延时比较精确
4.DPC定时