PortMidi
Cross-platform MIDI IO library
porttime.h File Reference

portable interface to millisecond timer. More...

#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef int32_t PtTimestamp
 real time or time offset in milliseconds.
 
typedef void() PtCallback(PtTimestamp timestamp, void *userData)
 a function that gets a current time
 

Enumerations

enum  PtError {
  ptNoError = 0 , ptHostError = -10000 , ptAlreadyStarted , ptAlreadyStopped ,
  ptInsufficientMemory
}
 PortTime error code; a common return type. More...
 

Functions

PMEXPORT PtError Pt_Start (int resolution, PtCallback *callback, void *userData)
 start a real-time clock service. More...
 
PMEXPORT PtError Pt_Stop (void)
 stop the timer. More...
 
PMEXPORT int Pt_Started (void)
 test if the timer is running. More...
 
PMEXPORT PtTimestamp Pt_Time (void)
 get the current time in ms. More...
 
PMEXPORT void Pt_Sleep (int32_t duration)
 pauses the current thread, allowing other threads to run. More...
 

Detailed Description

portable interface to millisecond timer.