Sleep
tip
Note that the max time you can sleep for is the timeout value of the script it is called from. If you ask to sleep for longer than that, it automatically caps the sleep time to the script timeout value.
Wait for a current thread for a specified time. It makes the cloud code script sleep for the requested amount of time.
Method Parameters
Parameter | Description |
---|---|
waitingTime | Time in millis. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var waitingTime = 1000;
bridge.sleep(waitingTime);
var waitingTime = 1000;
bridge.sleep(waitingTime);