PP_TIMERCHECK()
Determines if application timer has expired
Applies to:
Win32, Win64
Syntax-VB:
Declare Function pp_timercheck(ByVal timestamp As Long, ByVal minutes As Long) As Long
Syntax-C:
LONG pp_timercheck(LONG timestamp, LONG minutes)
Arguments:
<timestamp> is the timestamp of the start of the application
<minutes> is the number of minutes to let this application execute
Returns:
Refer to pp_errorstr() for a table of possible return codes and their meaning. Typically, only PP_FALSE [0] (timer not expired) or PP_TRUE [1] (timer expired) is returned.
Description:
Calculates the amount of time between the start of the application and now. The return code determines if the application should expire immediately or not.
Example:
' Start the timer at the beginning of the application and
' save the time stamp
Dim StartTime As Long
StartTime = pp_timerstart
...
' Now periodically check the timer. We only want the
' program to run for 15 minutes
Dim result As Long
result = pp_timercheck(StartTime, 15)
If (result = PP_SUCCESS) Then
MsgBox "Expired"
End If
See Also: