Skip to main content

IAR Embedded Workbench for Arm 9.70.x

__setSystemTimeout

In this section:
Syntax
__setSystemTimeout(timeout)
Parameters
timeout

The timeout in milliseconds.

Return value

The most recent value set by this macro, or 10000 (the default value) if the macro has not been called before.

For use with

All C-SPY drivers.

Description

Use this macro to set the timeout for an external application started with one of the macros __system1, __system2, or __system3. By default, the timeout is set to 10,000 milliseconds (10 seconds).

Example
__var exitCode;
__var out;
__var oldSize;
__var oldTimeout;

oldSize = __setSystemMaxData(100000);
oldTimeout = __setSystemTimeout(60000); // Changing the timeout to one minute 

exitCode = __system2("dir /S", &out);

__message "Previous data limit:";
__message oldSize

__message "Previous timeout:";
__message oldTimeout;

__message "Output from the dir command:";
__message out;
See also

__setSystemMaxData, __system1, __system2, and __system3.

Note

User-defined millisecond timeouts and delays are generated using the host operating system clock ticks. Because the host operating system is not a real-time OS, the actual delay or timeout will vary each time with approximately 5–20 ms.