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