12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Descriptions of the Library Routines 2SECNDSPortability Function: Returns the number of seconds that have elapsed since midnight, less thevalue of its argument.Module: USE IFPORTSyntax:result = SECNDS (r)r(Input) REAL(4). Number of seconds, precise to a hundredth of a second (0.01), to be subtracted.Results:The result type is REAL(4). The result value is the number of seconds that have elapsed sincemidnight, minus r, with a precision of a hundredth of a second (0.01).To start the timing clock, call SECNDS with 0.0, and save the result in a local variable. To get theelapsed time since the last call to SECNDS, pass the local variable to SECNDS on the next call.NOTE. SECNDS is an intrinsic procedure unless you specify USE IFPORT.SEEDCompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS LIBSee Also: “RTC”, “TIME”, the DATE_AND_TIME and SYSTEM_CLOCK subroutines and theSECNDS function in the Language <strong>Reference</strong>ExampleUSE IFPORTREAL(4) sINTEGER(4) i, js = SECNDS(0.0)DO I = 1, 100000J = J + 1END DOs = SECNDS(s)PRINT *, 'It took ',s, 'seconds to run.'Portability Subroutine: Changes the starting point of the pseudorandom number generator.2-385

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!