SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 1 Vol 2

CPU TIME

Name:
    CPU TIME
Type:
    Support Command
Purpose:
    Prints out the CPU time for the current Dataplot session and save the CPU time in the parameter CPUTIME.
Description:
    This command is primarily of interest when developing non-trivial macros. If a macro takes a long time to run, the CPU TIME command can be used to determine what parts of the macro are taking the most time and would therefore be the most important to make more efficient.

    The CPU TIME is cumulative from the start of the Dataplot session. If you want to measure the CPU time for a specific block of code, you typically enter the command at both the beginning and the end of the code block and then subtract the difference. This is demonstrated in the example program below.

Syntax:
    CPU TIME
Examples:
    CPU TIME
Note:
    This command uses the Fortran 90 CPU_TIME function. If you are using a version of Dataplot built with a Fortran 77 compiler, this command may not be available.
Default:
    None
Synonyms:
    None
Related Commands:
    TIME = Generate the current date and time.
    CALL = Execute a Dataplot macro.
Applications:
    Macro development
Implementation Date:
    2009/5
Program:
     
    CPU TIME
    LET TIME1 = CPUTIME
    CALL MINITEST.DP
    CPU TIME
    LET TIME2 = CPUTIME
    LET TIME = TIME2 - TIME1
    WRITE "MINTEST.DP TAKES ^TIME CPU SECONDS TO RUN"
        

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 09/09/2010
Last updated: 10/13/2015

Please email comments on this WWW page to alan.heckert@nist.gov.