:orphan: # TSGetNumEvents Get the numbers of events currently set to be detected ## Synopsis ``` #include "petscts.h" PetscErrorCode TSGetNumEvents(TS ts, PetscInt *nevents) ``` Logically Collective ## Input Parameter - ***ts -*** the `TS` context ## Output Parameter - ***nevents -*** the number of events ## See Also [](ch_ts), `TSEvent`, `TSSetEventHandler()` ## Level intermediate ## Location src/ts/event/tsevent.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/event/tsevent.c) [Index of all TS routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)