Discussion and questions about programming with Ultibo.
2 posts • Page 1 of 1
We have 2 functions to sleep: sleep and threadsleep - what are differences between them?
pik33 wrote:We have 2 functions to sleep: sleep and threadsleep - what are differences between them?
There is actually no difference at all, ThreadSleep is the Ultibo function from the Threads unit and Sleep is the FPC RTL function from the SysUtils unit.
In the default configuration Sleep simply calls ThreadSleep, although like almost everything in Ultibo that is designed to be replaceable if you want different behavior. The reason for having both is so that FPC code that uses common RTL functions will work in Ultibo without changes in many cases, for example the TThread class works as expected and simply calls the Ultibo API internally.
Ultibo.org | Make something amazing
Who is online
Users browsing this forum: No registered users and 1 guest