home *** CD-ROM | disk | FTP | other *** search
- with SYSTEM, TEXT_IO ;
-
- package body REMOTE_GLOBAL is -- must be compiled last
- -- for explicit control of optimization
- LOCAL : INTEGER;
-
- procedure REMOTE is -- this is an optimization control procedure
- begin
- GLOBAL := GLOBAL + LOCAL; -- be sure procedure is not optimized away
- exception
- when NUMERIC_ERROR =>
- REMOTE ; -- can not happen if test is working ( prevents inlining )
- end REMOTE;
-
- procedure CHECK_TIME ( TEST_DURATION : in DURATION ) is
- begin
- if TEST_DURATION < 100 * DURATION'SMALL or
- TEST_DURATION < 100 * SYSTEM.TICK then
- TEXT_IO.PUT_LINE ( " ***** TEST_DURATION not large compared to "
- & "DURATION'SMALL or SYSTEM.TICK " ) ;
- end if ;
- end CHECK_TIME ;
-
- begin
-
- A_ONE := 1 ; -- must not be changed by measurement programs
- LOCAL := GLOBAL - A_ONE; -- really a zero but compiler doesn't know
-
- end REMOTE_GLOBAL;
-