Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Time.Wait

Waits for the given number of milliseconds.

Component Version macOS Windows Linux Server iOS SDK
Time 11.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Time.Wait"; Duration )   More

Parameters

Parameter Description Example
Duration The duration in milliseocnds. 100

Result

Returns OK or error.

Description

Waits for the given number of milliseconds.
You can use this to delay something on purpose. We loop and process events, so dialogs redraw and wait till time is over.
Pass 1000 for a one second delay.
This pauses execution of evaluation or a script.

To avoid you block yourself endlessly, we limit the range to 1 to 60000 microseconds = one minute maximum.

Time.Wait allows windows to draw, while Time.Sleep blocks all events for the delay.

Examples

Waits 5 milliseconds:

Let([
    t1 = Get(CurrentTimeUTCMilliseconds);
    r = MBS( "Time.Wait"; 5 );
    t2 = Get(CurrentTimeUTCMilliseconds)
]; t1 & ¶ & t2)

See also

Release notes

Example Databases

Blog Entries

This function is free to use.

Created 13th April 2021, last changed 8th July 2021


Time.UnixTimeStampToFileMaker - Toolbar.Install