nMillisecondsInterval in milliseconds.
AdvPL GuideSleep(nMilliseconds)Pauses the executing thread for milliseconds.
The pause affects the calling thread. It neither confirms external-task completion nor guarantees exact real-time timing; scheduling also matters. Bound waits and avoid sleeping while holding locks or transactions. This example waits 25 milliseconds without data access. (Sources: refs. 1–2.)
Sleep(nMilliseconds)nMillisecondsInterval in milliseconds.
Return unspecified on the page; unused.
#Include "Protheus.ch"
User Function Ed666()
// Short bounded pause outside transactions or locks.
Sleep(25)
ConOut("Pause completed")
Return NilRequests a 25 ms pause and continues; exact duration was not measured. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.