sub PauseTime(seconds As Integer)
' Wait (loop and do nothing) for "seconds" seconds - used to make sure
' a file system command happened.
Dim start As New notesdatetime("")
Dim finish As New notesdatetime("")
Dim elapsedseconds As Integer
Dim i As Integer
start.setnow
finish.setnow
elapsedseconds = finish.timedifference(start)
While elapsedseconds < seconds
For i = 1 To 500
' do nothing
Next
finish.setnow
elapsedseconds = finish.timedifference(start)
Wend
End Sub