Flashnux

GNU/Linux man pages

Livre :
Expressions régulières,
Syntaxe et mise en oeuvre :

ISBN : 978-2-7460-9712-4
EAN : 9782746097124
(Editions ENI)

GNU/Linux

RedHat 6.2

(Zoot)

ttime(3)


TTIME

TTIME

NAME
C SYNOPSIS
FORTRAN SYNOPSIS
DESCRIPTION
EXAMPLE
BUGS

NAME

ttime − 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

#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.



ttime(3)