PetscGetTime

Returns the current time of day in seconds. This returns wall-clock time.

Synopsis

int PetscGetTime(PLogDouble *t)
Not Collective

Output Parameter

v -time counter

Usage

      PLogDouble 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 activatePETSc library timing. See the users manual for further details.

See Also

PLogEventRegister(), PLogEventBegin(), PLogEventEnd(), PLogStagePush(),
PLogStagePop(), PLogStageRegister(), PetscGetFlops()

Keywords

get, time

Examples

src/mat/examples/tutorials/ex1.c
src/sles/examples/tutorials/ex10.c

Location: src/plog/src/plog.c
Logging Index
Table of Contents