OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
elapse.c
Go to the documentation of this file.
1/*
2 *
3 * This file is part of MUMPS 5.5.1, released
4 * on Tue Jul 12 13:17:24 UTC 2022
5 *
6 *
7 * Copyright 1991-2022 CERFACS, CNRS, ENS Lyon, INP Toulouse, Inria,
8 * Mumps Technologies, University of Bordeaux.
9 *
10 * This version of MUMPS is provided to you free of charge. It is
11 * released under the CeCILL-C license
12 * (see doc/CeCILL-C_V1-en.txt, doc/CeCILL-C_V1-fr.txt, and
13 * https://cecill.info/licences/Licence_CeCILL-C_V1-en.html)
14 *
15 */
16#if defined(_WIN32)
17#include "elapse.h"
18#include <time.h>
19#include <sys/timeb.h>
20void MUMPS_CALL mumps_elapse(double *val)
21{
22 time_t ltime;
23 struct _timeb tstruct;
24
25 time (&ltime);
26 _ftime(&tstruct);
27 *val = (double) ltime + (double) tstruct.millitm*(0.001);
28}
29
30#else
31
32#include "elapse.h"
33#include <sys/time.h>
34void mumps_elapse(double *val)
35 {
36 struct timeval time;
37 gettimeofday(&time,(struct timezone *)0);
38 *val=time.tv_sec+time.tv_usec*1.e-6;
39 }
40#endif
void mumps_elapse(double *val)
Definition elapse.c:34
#define MUMPS_CALL