Bsoft  2.1.0
Bernard's software package
timer.cpp File Reference

Utilities for timing functions. More...

#include <ctime>
#include <sys/time.h>
#include "timer.h"
#include "utilities.h"

Go to the source code of this file.

Functions

double getwalltime ()
 Returns the current time. More...
 
double getcputime ()
 Returns the clock time. More...
 
double timer_start ()
 Starts timer and prints the time. More...
 
double timer_report (double lasttime)
 Reports the time elapsed since a given time. More...
 

Variables

int verbose
 

Detailed Description

Utilities for timing functions.

Author
Bernard Heymann
Date
Created: 20010316
Modified: 20100726

Definition in file timer.cpp.

Function Documentation

◆ getcputime()

double getcputime ( )

Returns the clock time.

The time format is in clock seconds since the start of the process.
Parameters
.
Returns
double the clock time in seconds.

Definition at line 49 of file timer.cpp.

◆ getwalltime()

double getwalltime ( )

Returns the current time.

Returns
double the current time in seconds.

The time format is in seconds since Jan. 1, 1970, including microseconds.

Definition at line 26 of file timer.cpp.

◆ timer_report()

double timer_report ( double  lasttime)

Reports the time elapsed since a given time.

Parameters
lasttimethe given initial time.
Returns
double the current time.

Definition at line 76 of file timer.cpp.

◆ timer_start()

double timer_start ( )

Starts timer and prints the time.

Parameters
.
Returns
double the current time.

Definition at line 61 of file timer.cpp.

Variable Documentation

◆ verbose

int verbose
extern