Pegasus InfoCorp: Web site design and web software development company

TTIME (3)

Get LAM timer value in seconds.

C SYNOPSIS

    #include <net.h>
    

    double ttime ();

FORTRAN SYNOPSIS

    double precision FTTIME()

DESCRIPTION

    The ttime() function enables a program running on any LAM node to read the current value of the system timer in a portable fashion. This is useful for measuring execution times of program sections. ttime() returns the timer value in seconds as a double precision floating point number.

EXAMPLE

      1.5i
      #include <stdio.h>
      #include <net.h>
      

      double time, start, end;

      start = ttime(); my_sub(); end = ttime(); time = end - start; printf("my_sub took: %f seconds to execute\\n", time);

BUGS

    The resolution of the measurements is bound by that of the underlying system timer used. man3/ttol.3