# Functions and Events: Timers

Timers generate events at specific time. This time can be periodic or a one shot. The timer can be setup in Vehicle Spy totally or you can optionally control it with C functions. The table below shows the properties of the timer you can set in Vehicle Spy. The timer functions include the ability to read and write the current time and the ability to enable the timer.

**Table 1: Timer Properties that can be Configured in Vehicle Spy**

| Timer Property | Description                                      |
| -------------- | ------------------------------------------------ |
| Name           | Name of the timer in C code.                     |
| Description    | Description of what the timer does.              |
| Type           | Periodic or One shot.                            |
| RunAtStart     | Should the timer run when Vehicle Spy Starts.    |
| Initial Period | The period of the timer when Vehicle Spy Starts. |
| Resolution     | Millisecond or Microsecond timer resolution.     |

![Figure 1: Timer Functions to control the timer using C code.](https://2396693198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlRJv2XDCMeZSU0VbeZlG%2Fuploads%2Fgit-blob-71b5e57385b91db7b77b0183c1e3c4e2fd0242ef%2Ftimer_functions.gif?alt=media)

![Figure 2: The Timer Events tab allows you to create a timer event at regular or single shot intervals.](https://2396693198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlRJv2XDCMeZSU0VbeZlG%2Fuploads%2Fgit-blob-de70e1c0e0e849704bdb9699211e25e15c7aa342%2Ftimer_event.gif?alt=media)

![Figure 3: The timer event is a simple function with no arguments that is called when the timer expires.](https://2396693198-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlRJv2XDCMeZSU0VbeZlG%2Fuploads%2Fgit-blob-079b9235ab61061245173e57e6e68c3150480dbe%2Ftimer_event_code.gif?alt=media)
