Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.
Joseph Ryan edited this page Aug 19, 2017 · 3 revisions

Go to the source code for time.h

Includes

  • #include "common.h"

Functions

Function Documention


InitializeSystemTime

Initializes a system timer with microsecond resolution

void InitializeSystemTime(void);


GetTimeUS

Outputs system time

tTime GetTimeUS(void);

Returns:

  • System time in microseconds

GetTime

Outputs system time

float GetTime(void);

Returns:

  • System time in seconds

CallInUS

Schedules a callback function to be called in given time

int CallInUS(tCallback callback, void *data, tTime us);

Parameters:

  • callback Function that will be called
  • data Argument sent to the callback function when it's called
  • us Period between calls, specified in microseconds

Returns:

  • ID that can be used to stop the call with CallStop

CallIn

Schedules a callback function to be called in given time

int CallIn(tCallback callback, void *data, float s);

Parameters:

  • callback Function that will be called
  • data Argument sent to the callback function when it's called
  • s Period between calls, specified in seconds

Returns:

  • ID that can be used to stop the call with CallStop

CallEveryUS

Schedules a callback function to be called repeatedly

int CallEveryUS(tCallback callback, void *data, tTime us);

Parameters:

  • callback Function that is called repeatedly
  • data Argument sent to the callback function each time it's called
  • us Period between calls, specified in microseconds

Returns:

  • ID that can be used to stop the call with CallStop

CallEvery

Schedules a callback function to be called repeatedly

int CallEvery(tCallback callback, void *data, float s);

Parameters:

  • callback Function that is called repeatedly
  • data Argument sent to the callback function each time it's called
  • s Period between calls, specified in seconds

Returns:

  • ID that can be used to stop the call with CallStop

CallStop

Stops a pending call based on the passed identifier

void CallStop(int id);

Parameters:

  • id Value returned by CallEvery and CallIn functions

WaitUS

Busy waits for given time

void WaitUS(tTime ms);

Parameters:

  • ms Amount of time to wait, specified in milliseconds

Wait

Busy waits for given time

void Wait(float s);

Parameters:

  • s Amount of time to wait, specified in seconds

Clone this wiki locally