Givaro
Public Member Functions
Timer Class Reference

Timer. More...

#include <givtimer.h>

Public Member Functions

 Timer ()
 
void clear ()
 Clear timer. More...
 
void start ()
 Start timer. More...
 
void stop ()
 Stop timer. More...
 
double usertime () const
 total amount of second spent in user mode. More...
 
double systime () const
 total amount of second spent in system mode. More...
 
double realtime () const
 real total amount of second spent. More...
 
double userElapsedTime ()
 User mode time spent since start. More...
 
double sysElapsedTime ()
 System mode time spent since start. More...
 
double realElapsedTime ()
 real total amount of second spent since start. More...
 
Timeroperator= (const Timer &T)
 
const Timer operator- (const Timer &T) const
 
const Timer operator- ()
 
const Timer operator+ (const Timer &T) const
 
Timeroperator+= (const Timer &T)
 
Timeroperator-= (const Timer &T)
 
std::ostream & print (std::ostream &) const
 
size_t count () const
 

Detailed Description

Timer.

Examples:
examples/FiniteField/gfq_atomic.C, examples/FiniteField/zpz_atomic.C, examples/Integer/givaro-ssh-keygen.C, examples/Integer/iexponentiation.C, examples/Integer/ifactor.C, examples/Integer/ifactor_lenstra.C, examples/Integer/igcd.C, examples/Integer/igcdext.C, examples/Integer/ilcm.C, examples/Integer/ispower.C, examples/Integer/isprime.C, examples/Integer/isproot.C, examples/Integer/lambda.C, examples/Integer/lambda_inv.C, examples/Integer/ModularSquareRoot.C, examples/Integer/nb_primes.C, examples/Integer/nextprime.C, examples/Integer/order.C, examples/Integer/phi.C, examples/Integer/prevprime.C, examples/Integer/primitiveelement.C, examples/Integer/primitiveroot.C, examples/Integer/probable_primroot.C, examples/Integer/ProbLucas.C, examples/Integer/RSA_breaking.C, examples/Integer/RSA_decipher.C, examples/Integer/RSA_encipher.C, examples/Integer/RSA_keys_generator.C, examples/Polynomial/highorder.C, examples/Polynomial/interpolate.C, examples/Polynomial/isirred.C, examples/Polynomial/isprimitive.C, examples/Polynomial/pol_eval.C, examples/Polynomial/pol_factor.C, examples/Polynomial/PolynomialCRT.C, and examples/Rational/iratrecon.C.

Constructor & Destructor Documentation

Timer ( )
inline

Member Function Documentation

void clear ( )
void start ( )
void stop ( )
double usertime ( ) const
inline

total amount of second spent in user mode.

Returns
the user time elapsed between the latest start() and the latest stop().
Precondition
stop() is called before.
Examples:
examples/FiniteField/gfq_atomic.C, and examples/FiniteField/zpz_atomic.C.
double systime ( ) const
inline

total amount of second spent in system mode.

Returns
the system time elapsed between the latest start() and the latest stop().
Precondition
stop() is called before.
double realtime ( ) const
inline

real total amount of second spent.

Returns
the real total time elapsed between the latest start() and the latest stop().
Precondition
stop() is called before.
double userElapsedTime ( )
inline

User mode time spent since start.

A call to stop() is useless.

Returns
elpased time (in seconds) since start() in user mode.
double sysElapsedTime ( )
inline

System mode time spent since start.

A call to stop() is useless.

Returns
elpased time (in seconds) since start() in system mode.
double realElapsedTime ( )
inline

real total amount of second spent since start.

A call to stop() is useless.

Returns
elpased time (in seconds) since start().
Timer & operator= ( const Timer T)
const Timer operator- ( const Timer T) const
const Timer operator- ( )
const Timer operator+ ( const Timer T) const
Timer& operator+= ( const Timer T)
inline
Timer& operator-= ( const Timer T)
inline
std::ostream & print ( std::ostream &  o) const
size_t count ( ) const
inline

The documentation for this class was generated from the following files: