\(\renewcommand\AA{\unicode{x212B}}\)
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.time()
Pause(0.05)
end_time = time.time()
print("The algorithm paused for {:.2f} seconds.".format(end_time-start_time))
Output:
The algorithm paused for ... seconds.
Categories: AlgorithmIndex | Utility\Development