# PetscTimeSubtract
Subtracts the current time of day (in seconds) from the value v. 
## Synopsis
```
#include <petsctime.h>
PetscErrorCode PetscTimeSubtract(PetscLogDouble *v)
```
Not Collective


## Input Parameter

- ***v -*** time counter



## Output Parameter

- ***v -*** time counter (v = v - current time)





## Notes
Since the PETSc libraries incorporate timing of phases and operations,
we do not every recommend using PetscTimeSubtract()
The options database command  -log_view activates
PETSc library timing.  See Users-Manual: ch_profiling for more details, also
see PetscLogStageRegister(), PetscLogEventRegister(), PetscLogEventBegin(), PetscLogEventEnd() for how to register
stages and events in application codes.


## See Also
 `PetscTime()`, `PetscTimeAdd()`, `PetscLogStageRegister()`, `PetscLogEventRegister()`, `PetscLogEventBegin()`, `PetscLogEventEnd()`


## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petsctime.h.html#PetscTimeSubtract">include/petsctime.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petsctime.h)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
