xref: /petsc/src/benchmarks/PetscTime.c (revision 98d6af09988025285d7494520dad1c51ee4e4d54)
1 #include "stdio.h"
2 #include "petsc.h"
3 #include "pinclude/ptime.h"
4 
5 int main( int argc, char **argv)
6 {
7   double x, y;
8 
9   PetscInitialize(&argc, &argv,0,0,0);
10  /* To take care of paging effects */
11    PetscTime(y);
12 
13    PetscTime(x);
14    PetscTime(y);
15    PetscTime(y);
16    PetscTime(y);
17    PetscTime(y);
18    PetscTime(y);
19    PetscTime(y);
20    PetscTime(y);
21    PetscTime(y);
22    PetscTime(y);
23    PetscTime(y);
24 
25   fprintf(stderr,"%-15s : %e sec\n","PetscTime",(y-x)/10.0);
26   PetscFinalize();
27   return 0;
28 }
29