Search code examples
.netdelphi-prism

Does Delphi Prism have Sleep() function?


I am coding in Delphi Prism and I need to pause a loop with sleep timer, but sleep(x) doesn't exist in Delphi prism. What function or procedure is there in Delphi prism to replace the sleep(x) procedure?

Thanks.


Solution

  • Delphi Prism is using the .NET framework, so you should be able to use Thread.Sleep instead of sleep(x);