Actual source code: PetscGetTime.c
1: /*$Id: PetscGetTime.c,v 1.17 2001/03/23 23:25:45 balay Exp $*/
3: #include petsc.h
7: int main(int argc,char **argv)
8: {
9: PetscLogDouble x,y;
10: int i,ierr;
11:
12: PetscInitialize(&argc,&argv,0,0);
13: /* To take care of paging effects */
14: PetscGetTime(&y);
16: for (i=0; i<2; i++) {
17: PetscGetTime(&x);
18: PetscGetTime(&y);
19: PetscGetTime(&y);
20: PetscGetTime(&y);
21: PetscGetTime(&y);
22: PetscGetTime(&y);
23: PetscGetTime(&y);
24: PetscGetTime(&y);
25: PetscGetTime(&y);
26: PetscGetTime(&y);
27: PetscGetTime(&y);
29: fprintf(stdout,"%-15s : %e sec\n","PetscGetTime",(y-x)/10.0);
30: }
32: PetscFinalize();
33: return(0);
34: }