[fpc-pascal] Microsecond Delay Suggestions?
james at productionautomation.net
Tue Jul 26 21:52:36 CEST 2016
>An alternative would be NtDelayExecution from unit jwanative. Its interval
argument is in multiples of 100ns
>and is essentially what Windows' Sleep() uses internally.
>Note: The first argument "Alertable" determines whether the function can be
interrupted by NtAlertThread
>(and whatever Windows API functions use that internally).
This sounds like it would work, but I can't figure out how to use it. Do
you have an example?
I've tried just a quick test like this:
DelayInterval : PLarge_Integer;
It won't let me set DelayInterval with a constant, I get "Incompatible
Types: got "shortint" expected "Plarge_Integer"
I really don't undertand these variable types that it wants.
More information about the fpc-pascal