# MIOS32_TIMESTAMP

## Functions
s32 | MIOS32_TIMESTAMP_Init (u32 mode)
s32 | MIOS32_TIMESTAMP_Inc (void)
s32 | MIOS32_TIMESTAMP_Get (void)
s32 | MIOS32_TIMESTAMP_GetDelay (u32 captured_timestamp)

## Detailed Description

mS accurate Timestamp for MIOS32

## Function Documentation

s32 MIOS32_TIMESTAMP_Get | ( | void |  | ) |

Use this function to get the current timestamp

Returns:
  the current timestamp

s32 MIOS32_TIMESTAMP_GetDelay | ( | u32 | captured_timestamp | ) |

Use this function to get the delay which has passed between a given and and current timestamp.

Usage Example:

       u32 captured_timestamp = MIOS32_TIMESTAMP_GetDelay();
       // ...
       // ... do something ...
       // ...
       u32 delay_in_ms = MIOS32_TIMESTAMP_GetDelay(captured_timestamp);
       MIOS32_MIDI_SendDebugMessage("Delay: %d mS\n", delay_in_ms);

Returns:
  the delay between the given and the current timestamp

s32 MIOS32_TIMESTAMP_Inc | ( | void |  | ) |

Increments the timestamp, typically based on the FreeRTOS clock (1 mS)

Note:
  this function is called from vApplicationTickHook in main.c Don't call it from your application.

Returns:
  number of SRs

s32 MIOS32_TIMESTAMP_Init | ( | u32 | mode | ) |

Resets the timestamp

Parameters:

  `[in]` | mode | currently only mode 0 supported

Returns:
  < 0 if initialisation failed