- Main Page
- Namespaces
- Data Structures
- Files

- Search for |

- File List
- Globals

# HydroSDL/timing/timing.cpp File Reference

`#include "SDL.h"`
`#include "timing.h"`

Include dependency graph for timing.cpp:

Go to the source code of this file.

## Functions
void | tic ()
| Timinig function, similar to MATLAB's tic.
float | toc ()
| Timing function, similar to MATLAB's toc.
## Variables
Uint32 | offset

## Detailed Description

Author:
  basile.graf@epfl.ch

Timing functions for real time simulation. Cross platform implementation using SDL.

Definition in file timing.cpp.

## Function Documentation

void tic | ( |  | ) |

Timinig function, similar to MATLAB's tic.

Initializes the timer (for realtime simulation)

Definition at line 15 of file timing.cpp.

References offset.

Referenced by main().

float toc | ( |  | ) |

Timing function, similar to MATLAB's toc.

Returns the time elapsed in seconds since the last call of tic()
Resolution is 1 ms

Returns:
  time in seconds

Definition at line 20 of file timing.cpp.

References f(), and offset.

Referenced by main().

## Variable Documentation

Uint32 offset

Definition at line 13 of file timing.cpp.

Referenced by tic(), and toc().