|
of_wait
|
|
Full name
|
pfc_n_cst_datetime.of_wait
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_wait(unsignedlong)
|
Name
|
Datatype
|
ldtm_target
|
datetime
|
li_ret
|
integer
|
public function integer of_wait (unsignedlong al_seconds);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_Wait
//
// Access: public
//
// Arguments:
// al_seconds Wait this many Seconds.
//
// Returns: integer
// 1 if function waited the expected time.
// If any argument's value is NULL, function returns NULL.
// If any argument's value is Invalid, function returns -1.
//
// Description: Given a datetime, will wait until datetime is reached.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
datetime ldtm_target
integer li_ret
//Check parameters
If IsNull(al_seconds) Then
Return al_seconds
End If
//Check invalid parameters
If al_seconds <= 0 Then
Return -1
End If
//Get the Target DateTime
ldtm_target = of_RelativeDatetime(DateTime(Today(),Now()), al_seconds)
//Perform the actual wait.
li_ret = of_Wait(ldtm_target)
Return li_ret
end function