ttime(3)

ttime3

Get lam timer value in seconds.

C synopsis

#include <net.h>
double ttime ();

Fortran synopsis

double precision FTTIME()

Overview

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.

Examples

#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);

Releases

2 releases since Debian 2.1 (Slink); the text changed 1 time.

  1. 2.1
  2. 2.2

Bugs

The resolution of the measurements is bound by that of the underlying system timer used.

From lam2-dev 6.3.2-3 in Debian 2.2 (Potato). Parsed by carta from the page's man source.