Download QNAP2 version 9.3 User's Guide

Transcript
4
CANCELTIMER is used to cancel any previous LAUNCHTIMER setting.
Example:
/DECLARE/ EXCEPTION CPULIMIT;
PROCEDURE CLEANUP;
BEGIN
PRINT ("CPU time limit expired");
PRINT ("Cleaning up at ", TIME);
SAVERUN ("suspend");
STOP;
END;
/EXEC/
BEGIN
SETEXCEPT:CONNECT (CPULIMIT, "CPU TIME", CLEANUP);
SETEXCEPT:LAUNCHTIMER (CPULIMIT, 3600);
END;
The exception object CPULIMIT is connected to the external signal \CPU TIME", controlling
the CPU time limit. Then, the CPU timer is launched for 3600 seconds. When the CPU time
limit is reached, the operating system sends the \CPU TIME" signal to Qnap2. The exception
is raised and the CLEANUP procedure is executed, in order to save the model and stop the
simulation in a clean way.
User's Guide
Modeling Mechanisms 151