PetscTime#

Returns the current time of day in seconds.

Synopsis#

#include <petsctime.h>
PetscErrorCode PetscTime(PetscLogDouble *v)

Not Collective

Output Parameter#

  • v - time counter

Usage#

PetscLogDouble v; PetscTime(&v); …. perform some calculation … printf(“Time for operation %g\n”,v);

Notes#

Since the PETSc libraries incorporate timing of phases and operations, we do not recommend ever using PetscTime() The options database command -log_view activate PETSc library timing. See Users-Manual: ch_profiling for more details.

See Also#

PetscTimeSubtract(), PetscTimeAdd(), PetscLogStageRegister(), PetscLogEventRegister(), PetscLogEventBegin(), PetscLogEventEnd()

Level#

developer

Location#

include/petsctime.h

Examples#

src/ksp/ksp/tutorials/bench_pcsetup.c.html


Edit on GitLab

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages