PetscErrorCode PETSC_DLLEXPORT PetscGetTime(PetscLogDouble *t)Not Collective
#include "petsctime.h"
PetscLogDouble v1,v2,elapsed_time;
ierr = PetscGetTime(&v1);CHKERRQ(ierr);
.... perform some calculation ...
ierr = PetscGetTime(&v2);CHKERRQ(ierr);
elapsed_time = v2 - v1;
Since the PETSc libraries incorporate timing of phases and operations, PetscGetTime() is intended only for timing of application codes. The options database commands -log, -log_summary, and -log_all activate PETSc library timing. See the users manual for further details.
Level:intermediate
Location:src/sys/time/ptime.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages