source: CPL/oasis3-mct/branches/OASIS3-MCT_5.0_branch/lib/mct/mpi-serial/time.c @ 6331

Last change on this file since 6331 was 6331, checked in by aclsce, 17 months ago

Moved oasis-mct_5.0 in oasis3-mct/branches directory.

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.