1 #ifndef lint 2 static char vcid[] = "$Id: PetscGetTime.c,v 1.4 1996/03/19 21:30:13 bsmith Exp bsmith $"; 3 #endif 4 5 #include "stdio.h" 6 #include "petsc.h" 7 8 int main( int argc, char **argv) 9 { 10 PLogDouble x, y; 11 int i; 12 13 PetscInitialize(&argc, &argv,0,0); 14 /* To take care of paging effects */ 15 y = PetscGetTime(); 16 17 for ( i=0; i<2; i++ ) { 18 x = 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 y = PetscGetTime(); 28 y = PetscGetTime(); 29 30 fprintf(stderr,"%-15s : %e sec\n","PetscGetTime", (y-x)/10.0); 31 } 32 33 PetscFinalize(); 34 return 0; 35 } 36