sleep
Syntax
- sleep(int milliseconds)
Arguments
- milliseconds
- The time in milliseconds for which the filter's execution should be suspended.
Description
- The sleep function delays execution of the filter for a specific period of time. It is not advisable to use this function in the RGBA or ForEveryPixel handlers, as this will cause the filter to pause for every pixel in the image and slow program execution dramatically.
Example
sleep(10); // Pauses execution for 10 milliseconds
Comments
- Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.