source: CONFIG_DEVT/IPSLCM6.5_work_ENSEMBLES/oasis3-mct/BLD/build/lib/mctdir/mpi-serial/time.c @ 5725

Last change on this file since 5725 was 5725, checked in by aclsce, 3 years ago

Added new oasis3-MCT version to be used to handle ensembles simulations with XIOS.

File size: 399 bytes
Line 
1
2#include <sys/time.h>
3#include <time.h>
4
5
6#include "mpiP.h"
7
8
9double MPI_Wtime(void);
10
11
12
13double FC_FUNC( mpi_wtime, MPI_WTIME )(void)
14{
15  return(MPI_Wtime());
16}
17
18
19
20double MPI_Wtime(void)
21{
22  struct timeval tv;
23
24  if (gettimeofday(&tv,0))
25    {
26      fprintf(stderr,"MPI_Wtime: error calling gettimeofday()\n");
27      abort();
28    }
29
30
31  return((double)(tv.tv_sec) + (double)(tv.tv_usec)/1e6) ;
32}
33
34
35
Note: See TracBrowser for help on using the repository browser.