22. High-level API Reference
www.yoctopuce.com
163
YAPI
YAPI.Sleep()
ySleep()
Pauses the execution flow for a specified duration.
js
function ySleep(
ms_duration
,
errmsg
)
cpp
YRETCODE ySleep( unsigned
ms_duration
, string&
errmsg
)
m
+(YRETCODE) Sleep :(unsigned)
ms_duration
:(NSError **)
errmsg
pas
function ySleep(
ms_duration
: integer, var
errmsg
: string): integer
vb
function ySleep( ByVal
ms_duration
As Integer,
ByRef
errmsg
As String) As Integer
cs
int Sleep( int
ms_duration
, ref string
errmsg
)
java
int Sleep( long
ms_duration
)
uwp
Task<int> Sleep( ulong
ms_duration
)
py
def Sleep(
ms_duration
,
errmsg
=None)
php
function ySleep(
$ms_duration
,
&$errmsg
)
es
function Sleep(
ms_duration
,
errmsg
)
This function implements a passive waiting loop, meaning that it does not consume CPU cycles
significantly. The processor is left available for other threads and processes. During the pause, the
library nevertheless reads from time to time information from the Yoctopuce modules by calling
yHandleEvents()
, in order to stay up-to-date.
This function may signal an error in case there is a communication problem while contacting a module.
Parameters :
ms_duration
an integer corresponding to the duration of the pause, in milliseconds.
errmsg
a string passed by reference to receive any error message.
Returns :
YAPI_SUCCESS
when the call succeeds.
On failure, throws an exception or returns a negative error code.
Summary of Contents for Yocto-Display
Page 1: ...Yocto Display User Manual...
Page 2: ......
Page 40: ...34 www yoctopuce com...
Page 52: ...46 www yoctopuce com...
Page 84: ...78 www yoctopuce com...
Page 92: ...86 www yoctopuce com...
Page 130: ...124 www yoctopuce com...
Page 422: ...416 www yoctopuce com...