xref: /petsc/src/benchmarks/PetscGetTime.c (revision 3345557301b3dba1b1564b00e2d9639e34db86ac)
1 #ifndef lint
2 static char vcid[] = "$Id: MPI_Wtime.c,v 1.3 1996/03/06 17:40:32 balay Exp $";
3 #endif
4 
5 #include "stdio.h"
6 #include "petsc.h"
7 
8 int main( int argc, char **argv)
9 {
10   double x, y;
11 
12   PetscInitialize(&argc, &argv,0,0,0);
13  /* To take care of paging effects */
14   y = PetscGetTime();
15 
16   x = PetscGetTime();
17   y = PetscGetTime();
18   y = PetscGetTime();
19   y = PetscGetTime();
20   y = PetscGetTime();
21   y = PetscGetTime();
22   y = PetscGetTime();
23   y = PetscGetTime();
24   y = PetscGetTime();
25   y = PetscGetTime();
26   y = PetscGetTime();
27 
28   fprintf(stderr,"%-15s : %e sec\n","PetscGetTime", (y-x)/10.0);
29   PetscFinalize();
30   return 0;
31 }
32