Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
chrono_private.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_private.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
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43#ifndef ON
44#define RESET 0
45#define ON 1
46#define OFF 2
47#endif
48
49#define BIG 1e6
50#define BIG1 1e-6
51#define TIMEMAX 12
52
60typedef struct mytime {
62#ifdef MMG_POSIX
63 struct timeval rutim;
64 struct rusage ru;
65#else
67 FILETIME ftIni, ftEnd, ftSys, ftUser;
68 SYSTEMTIME stSys, stUser;
69 LARGE_INTEGER frequency;
70 LARGE_INTEGER rutim;
71#endif
72 int call;
74
75
76/* prototypes */
77LIBMMG_CORE_EXPORT void chrono(int cmode,mytime *ptt);
78LIBMMG_CORE_EXPORT void tminit(mytime *t,int maxtim);
79LIBMMG_CORE_EXPORT void printim(double ,char *);
80
81#ifdef __cplusplus
82}
83#endif
84
85#endif
LIBMMG_CORE_EXPORT void chrono(int cmode, mytime *ptt)
Function to measure time.
Definition: chrono.c:49
LIBMMG_CORE_EXPORT void tminit(mytime *t, int maxtim)
Initialize mytime object.
Definition: chrono.c:120
LIBMMG_CORE_EXPORT void printim(double, char *)
Print real time.
Definition: chrono.c:160
#define LIBMMG_CORE_EXPORT
Chrono object.
FILETIME ftEnd
double gdif
double sdif
LARGE_INTEGER rutim
FILETIME ftIni
double gini
SYSTEMTIME stSys
FILETIME ftSys
SYSTEMTIME stUser
FILETIME ftUser
LARGE_INTEGER frequency
double gend
double sini
HANDLE thisProcess
double uini
double send
double uend
double udif