>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  LIBRARIES_TIMER

LIBRARIES_TIMER

LIBRARIES_TIMER

Name


      TIMER

Purpose


      Measure elapsed time between calls.

Category


Calling Sequence


      timer, [dt]

Inputs


Keyword Parameters


Keywords


        /RESET resets timer to 0.
        /START starts timer.
        /STOP stops timer (actually updates elapsed time).
        /SUM Use with /STOP to total elapsed time. Must use
          /START and /STOP as pairs for this to make sense.
          Do not do a /stop without a /start.
        /PRINT prints timer report.
        NUMBER = n. Select timer number to use (default = 0).
            Timer numbers 0 through 9 may be used.
        COMMENT = cmt_text. Causes /PRINT to print:
          cmt_text elapsed time: hh:mm:ss (nnn sec)

Outputs


      dt = optionally returned elapsed time in seconds. out

Common Blocks


      timer_com

Notes


Notes


Examples


        timer, /start use this call to start timer.
        timer, /stop, /print, dt use this call to stop timer
          and print start, stop, elapsed time. This example also
          returns elapsed time in seconds.
        Timer must be started before any elapsed time is available.
        Timer may be stopped any number of times after starting once, and
        the elapsed time is the time since the last timer start.
        timer, /start, number=5 starts timer number 5.
        timer, /stop, /print, number=5 stops timer number 5
        and prints result.

Modification History


      R. Sterner, 17 Nov, 1989
      R. Sterner, 28 Sep, 1993 --- Used dt_tm_tojs to handle long intervals.
      R. Sterner, 2 Dec, 1993 --- Now uses systime(1) for high precision.
      R. Sterner, 2004 Jul 07 --- Now only updates dt on /STOP.
      R. Sterner, 2004 Jul 07 --- Added /SUM and /CLEAR.
      R. Sterner, 2010 May 23 --- Converted arrays from () to [].
  Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us