timer.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2011 Equinor ASA, Norway.
3
4 The file 'timer.h' is part of ERT - Ensemble based Reservoir Tool.
5
6 ERT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 ERT is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.
14
15 See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
16 for more details.
17*/
18
19#ifndef ERT_TIMER_H
20#define ERT_TIMER_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include <time.h>
27#include <stdlib.h>
28
29
30typedef struct timer_struct timer_type;
31
37
38 double timer_get_total_time(const timer_type *timer);
39 double timer_get_max_time(const timer_type *timer);
40 double timer_get_min_time(const timer_type *timer);
41 double timer_get_avg_time(const timer_type *timer);
42
43
44#ifdef __cplusplus
45}
46#endif
47#endif
48
double timer_get_max_time(const timer_type *timer)
void timer_start(timer_type *)
void timer_free(timer_type *)
struct timer_struct timer_type
Definition: timer.hpp:30
timer_type * timer_alloc(bool)
double timer_get_avg_time(const timer_type *timer)
double timer_stop(timer_type *)
void timer_reset(timer_type *)
double timer_get_min_time(const timer_type *timer)
double timer_get_total_time(const timer_type *timer)