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