PetscGetTime
Returns the current time of day in seconds. This returns wall-clock time.
Synopsis
#include "petsc.h"
int PetscGetTime(PetscLogDouble *t)
Not Collective
Output Parameter
v -time counter
Usage
PetscLogDouble v1,v2,elapsed_time;
ierr = PetscGetTime(&v1);CHKERR(ierr);
.... perform some calculation ...
ierr = PetscGetTime(&v2);CHKERR(ierr);
elapsed_time = v2 - v1;
Notes
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.
See Also
PetscLogEventRegister(), PetscLogEventBegin(), PetscLogEventEnd(), PetscLogStagePush(),
PetscLogStagePop(), PetscLogStageRegister(), PetscGetFlops()
Keywords
get, time
Level:intermediate
Location:src/sys/src/plog/plog.c
Index of all Profiling routines
Table of Contents for all manual pages
Index of all manual pages
Examples
src/sles/examples/tutorials/ex10.c.html