prog::wait

Wait for a while

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

prog::wait(m)
prog::wait(s)

Description

prog::wait(m) waits for m milli seconds.

prog::wait(s) waits for s seconds.

prog::wait uses the function rtime for time measurement.

Examples

Example 1

Wait for 3 seconds:

prog::wait(3000)

Wait for 3 seconds again:

prog::wait(3.0)

The next example shows the difference between the system time and the CPU time used by MuPAD®:

time(prog::wait(2.5))

In 2.5 seconds realtime the MuPAD process runs nearly two seconds.

Example 2

Use traperror to limit the evaluation time:

traperror(prog::wait(100.0), 5): lasterror()
Error: Execution time is exceeded.

Parameters

m

Milli seconds to wait as positive integer

s

Seconds to wait as positive floating-point number

Return Values

prog::wait returns the empty object null().

See Also

MuPAD Functions

Was this topic helpful?