dcrp_call_on_time

Asynchronously calls the given function after at least the specified time period has passed.

Syntax

int dcrp_call_on_time (int time,
                       int time_unit,
                       char *function,
                       int timer_id)

Input Parameters

time

Contains the amount of time to wait before calling given function.

time_unit

Defines the units for the amount of time. Valid values are:

  • TOOLKIT_TIME_TICKS
  • TOOLKIT_TIME_SECONDS
  • TOOLKIT_TIME_MINUTES
  • TOOLKIT_TIME_HOURS
function

Is the pointer to function to be called when specified time has passed.

timer_id

Is a unique identifier for timer being set to track previously defined time interval. Value should be between 1 and 200.

Output Parameters

None

Return Value

This subroutine returns one of the following:

TOOLKIT_SUCCESS Function completed successfully.
TOOLKIT_FAILURE Function not completed successfully.

On TOOLKIT_FAILURE , the function specified in the argument list will not be called.