Zzzzzz….

Mental note to self:

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub DoSleep(repeat As Integer, sleep_period As Long)
   Dim i As Integer

   While i < repeat
      Call Sleep(sleep_period)
      i = i + 1
   Wend

   MsgBox "Awoke..."
End Sub

Published by

lekkim

Positive, competent, out-spoken, frank and customer focused architect and developer with a strong foundation in web, cloud and product development. I'm a strong advocate for API first and cloud based solutions and development. I have a knack for being able to communicate and present technically complicated matters in conference, customer and training settings. I've previously acted as team member and leader in a product organisation.

2 thoughts on “Zzzzzz….”

  1. Hi Mikkel,

    I tried to copy your code in an agent in Lotus Notes 6.5 but I get this error message: (Declarations): 2: Unexpected: Sleep; Expected: Identifier.

    In Lotus Notes there is already a statement "Sleep" may be causing the problem?

    By the way: in an agent that we are writing at work the statement "Sleep" does not work: even if inserted at some point in the code, the entire Agent is paused from the beginning.

    Many Thanks for your time.

     

Comments are closed.