AddInIdleDelay
Function : AddIn
AddInIdleDelay - Yield processor for specified time, and check if termination required
#include <addin.h>
BOOL LNPUBLIC AddInIdleDelay(
DWORD Delay);
AddInIdleDelay checks to see if the add-in process should terminate, then
suspends the process for the number of milliseconds specified by the Delay
argument, giving other Lotus Domino Server tasks a chance to process.
AddInIdleDelay returns TRUE if the add-in task should terminate and FALSE if
the add-in task should continue.
AddInIdleDelay provides the same functionality as AddInIdle but with the added flexibility of the Delay argument.
Use AddInIdleDelay if your add-in task needs control over the amount of time it
is suspended. To ensure that "tell
AddInIdleDelay returns TRUE immediately, without suspending the calling task, if the calling task should terminate.
If you are writing messages to the Domino Server or Notes client log file, then you should call AddInIdle or AddInIdleDelay on a regular bases. This will flush log entries from memory to disk and will free up memory.
Parameters : Input : Delay - Time, in milliseconds, to delay processing, giving other tasks a chance to process
Output : (routine) - TRUE if addin should terminate, FALSE if OK to continue
Sample Usage :
/*If no events are pending, sleep for a while and check the quit flag. */
if (DQNonePending)
{
if (AddInIdleDelay(3000))
{
fEventShutdown = TRUE;
break;
}
continue;
}