\(\renewcommand\AA{\unicode{x212B}}\)

Pause v1

../_images/Pause-v1_dlg.png

Pause dialog.

Summary

Pause a script for a given duration.

Properties

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.

Description

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.

Usage

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

Source

C++ header: Pause.h

C++ source: Pause.cpp