Type: Time
The read-only waitTime property of the Lock class is set to the timeout parameter of the lock request. This property specifies the total length of time the lock request waits from the time it first attempted to get the lock until a lock exception is reported back if the object is currently locked by another user.
The following example shows the use of the waitTime property.
vars lock : Lock; locksArray : LockArray; begin create locksArray transient; system.getQueuedLocks(locksArray, 40); foreach lock in locksArray do //access the lock entry properties write lock.requestedBy.String; write lock.elapsedTime.String; write lock.waitTime.String; endforeach; locksArray.purge; delete locksArray; end;
If you want to obtain the length of time the lock request has been in place, use the Lock class elapsedTime property.