aboutsummaryrefslogtreecommitdiff
path: root/pd/portmidi/porttime/porttime.h
blob: 029ea7779c42288b5f10eaa0775fff32ab40dfbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* porttime.h -- portable interface to millisecond timer */

/* CHANGE LOG FOR PORTTIME
  10-Jun-03 Mark Nelson & RBD
    boost priority of timer thread in ptlinux.c implementation
 */

/* Should there be a way to choose the source of time here? */

#ifdef __cplusplus
extern "C" {
#endif


typedef enum {
    ptNoError = 0,
    ptHostError = -10000,
    ptAlreadyStarted,
    ptAlreadyStopped,
    ptInsufficientMemory
} PtError;


typedef long PtTimestamp;

typedef void (PtCallback)( PtTimestamp timestamp, void *userData );


PtError Pt_Start(int resolution, PtCallback *callback, void *userData);
PtError Pt_Stop();
int Pt_Started();
PtTimestamp Pt_Time();

#ifdef __cplusplus
}
#endif