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.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

Source

C++ source: Pause.cpp

C++ header: Pause.h