mmgs
chrono.h
Go to the documentation of this file.
1
/* =============================================================================
2
** This file is part of the mmg software package for the tetrahedral
3
** mesh modification.
4
** Copyright (c) Bx INP/CNRS/Inria/UBordeaux/UPMC, 2004-
5
**
6
** mmg is free software: you can redistribute it and/or modify it
7
** under the terms of the GNU Lesser General Public License as published
8
** by the Free Software Foundation, either version 3 of the License, or
9
** (at your option) any later version.
10
**
11
** mmg is distributed in the hope that it will be useful, but WITHOUT
12
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14
** License for more details.
15
**
16
** You should have received a copy of the GNU Lesser General Public
17
** License and of the GNU General Public License along with mmg (in
18
** files COPYING.LESSER and COPYING). If not, see
19
** <http://www.gnu.org/licenses/>. Please read their terms carefully and
20
** use this copy of the mmg distribution only if you accept them.
21
** =============================================================================
22
*/
23
24
#ifndef CHRONO_H
25
#define CHRONO_H
26
27
#include <time.h>
28
#include "
mmgcommon.h
"
29
30
#ifndef MMG_POSIX
31
#include <windows.h>
32
#else
33
#include <sys/time.h>
34
#include <sys/resource.h>
35
#endif
36
37
#ifdef __cplusplus
38
extern
"C"
{
39
#endif
40
41
#ifndef ON
42
#define RESET 0
43
#define ON 1
44
#define OFF 2
45
#endif
46
47
#define BIG 1e6
48
#define BIG1 1e-6
49
#define TIMEMAX 12
50
58
typedef
struct
mytime
{
59
double
gini
,
gend
,
gdif
,
uini
,
uend
,
udif
,
sini
,
send
,
sdif
;
60
#ifdef MMG_POSIX
61
struct
timeval
rutim
;
62
struct
rusage ru;
63
#else
64
HANDLE
thisProcess
;
65
FILETIME
ftIni
,
ftEnd
,
ftSys
,
ftUser
;
66
SYSTEMTIME
stSys
,
stUser
;
67
LARGE_INTEGER
frequency
;
68
LARGE_INTEGER
rutim
;
69
#endif
70
int
call
;
71
}
mytime
;
72
73
74
/* prototypes */
75
void
chrono
(
int
cmode,
mytime
*ptt);
76
void
tminit
(
mytime
*t,
int
maxtim);
77
void
printim
(
double
,
char
*);
78
79
#ifdef __cplusplus
80
}
81
#endif
82
83
#endif
mytime
struct mytime mytime
tminit
void tminit(mytime *t, int maxtim)
Initialize mytime object.
Definition:
chrono.c:120
chrono
void chrono(int cmode, mytime *ptt)
Function to measure time.
Definition:
chrono.c:49
printim
void printim(double, char *)
Print real time.
Definition:
chrono.c:149
mmgcommon.h
mytime
Chrono object.
Definition:
chrono.h:58
mytime::ftEnd
FILETIME ftEnd
Definition:
chrono.h:65
mytime::gdif
double gdif
Definition:
chrono.h:59
mytime::sdif
double sdif
Definition:
chrono.h:59
mytime::rutim
LARGE_INTEGER rutim
Definition:
chrono.h:68
mytime::ftIni
FILETIME ftIni
Definition:
chrono.h:65
mytime::gini
double gini
Definition:
chrono.h:59
mytime::stSys
SYSTEMTIME stSys
Definition:
chrono.h:66
mytime::ftSys
FILETIME ftSys
Definition:
chrono.h:65
mytime::call
int call
Definition:
chrono.h:70
mytime::stUser
SYSTEMTIME stUser
Definition:
chrono.h:66
mytime::ftUser
FILETIME ftUser
Definition:
chrono.h:65
mytime::frequency
LARGE_INTEGER frequency
Definition:
chrono.h:67
mytime::gend
double gend
Definition:
chrono.h:59
mytime::sini
double sini
Definition:
chrono.h:59
mytime::thisProcess
HANDLE thisProcess
Definition:
chrono.h:64
mytime::uini
double uini
Definition:
chrono.h:59
mytime::send
double send
Definition:
chrono.h:59
mytime::uend
double uend
Definition:
chrono.h:59
mytime::udif
double udif
Definition:
chrono.h:59
src
common
chrono.h
Generated on Thu Jan 20 2022 00:00:00 for mmgs by
1.9.1