| Bsoft 2.0.5 Bernard's software package

Functions
timer.h File Reference

Utilities for timing functions. More...

`#include <time.h>`
`#include <sys/time.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...

## Detailed Description

Utilities for timing functions.

Author
  Bernard Heymann

Date
  Created: 20010316
  Modified: 20100726

Definition in file timer.h.

## 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 40 of file timer.cpp.

## ◆ getwalltime()

double getwalltime | ( |  | ) |

Returns the current time.

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

Parameters

  . |

Returns
  double the current time in seconds.

Definition at line 23 of file timer.cpp.

## ◆ timer_report()

double timer_report | ( | double | lasttime | ) |

Reports the time elapsed since a given time.

Parameters

  lasttime | the given initial time.

Returns
  double the current time.

Definition at line 67 of file timer.cpp.

## ◆ timer_start()

double timer_start | ( |  | ) |

Starts timer and prints the time.

Parameters

  . |

Returns
  double the current time.

Definition at line 52 of file timer.cpp.