This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathttime.h
78 lines (52 loc) · 1.74 KB
/
ttime.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
* ttime.h : Tobii Eye Tracker Low Level API. The Tobii Time interface.
*
* Ver 2005-03-22 LK
*
* Copyright (C) Tobii Technology 2003-2005, all rights reserved.
*/
#ifndef TTIME_H_
#define TTIME_H_
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(_WIN32)
/* Enable Windows dll export */
#define DLL_EXPORT __declspec (dllexport)
/* Ensures MS VC Compiler packs struct byte by byte (fully aligned) */
#pragma pack(push, mypack, 1)
#else
#define DLL_EXPORT
#endif
/* The Tobii time stamp. */
typedef struct _STimeStamp {
long second;
long microsecond;
} STimeStamp;
/* Calibration information returned from TT_GetCurrentTime. */
typedef struct _STTime {
short year;
short month; /* January = 1, February = 2, and so on. */
short dayofweek;/* day of the week; Sunday = 0, Monday = 1, and so on. */
short day;
short hour;
short minute;
short second;
short milliseconds;
} STTime;
DLL_EXPORT long __stdcall TT_IsSupported(void);
DLL_EXPORT void __stdcall TT_GetLocalTimeStamp(STimeStamp *pTimeStamp);
DLL_EXPORT long __stdcall TT_GetServerTimeStamp(STimeStamp *pTimeStamp);
DLL_EXPORT long __stdcall TT_ElapsedTime(STimeStamp *pStart, STimeStamp *pStop, STimeStamp *pRes);
DLL_EXPORT void __stdcall TT_AddTime(STimeStamp *pTime1, STimeStamp *pTime2, STimeStamp *pRes);
DLL_EXPORT void __stdcall TT_AverageTime(STimeStamp *pTime1, STimeStamp *pTime2, STimeStamp *pRes);
DLL_EXPORT long __stdcall TT_Compare(STimeStamp *pTime1, STimeStamp *pTime2);
DLL_EXPORT void __stdcall TT_GetCurrentTime(STTime *pCurrentTime);
#if defined(_WIN32)
/* Restore MS VC Compiler packing setting */
#pragma pack(pop, mypack)
#endif
#if defined(__cplusplus)
}
#endif
#endif /* TTIME_H_ */