Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
Duration | Input | number | 1 | How long to pause, in seconds. Default 1. Enter a negative number to pause forever until cancelled. |
This is a very simple algorithm that does nothing for a given number of seconds.
This can be used during debugging, for example, to slow down the execution of a fast script.
Example - Pausing for a time:
import time
start_time = time.clock()
Pause(0.05)
end_time = time.clock()
print ("The algorithm paused for %.2f seconds." % (end_time-start_time))
Output:
The algorithm paused for ... seconds.
Categories: Algorithms | Utility | Development