|
@@ -12,14 +12,8 @@
|
12
|
12
|
#include "cmMidiFile.h"
|
13
|
13
|
#include "cmMidiFilePlay.h"
|
14
|
14
|
#include "cmThread.h" // cmSleepUs()
|
|
15
|
+#include "cmTime.h"
|
15
|
16
|
|
16
|
|
-#ifdef OS_OSX
|
17
|
|
-#include "osx/clock_gettime_stub.h"
|
18
|
|
-#endif
|
19
|
|
-
|
20
|
|
-#ifdef OS_LINUX
|
21
|
|
-#include <time.h> // clock_gettime()
|
22
|
|
-#endif
|
23
|
17
|
|
24
|
18
|
typedef struct
|
25
|
19
|
{
|
|
@@ -286,7 +280,7 @@ void _cmMfpTestTimer()
|
286
|
280
|
|
287
|
281
|
// t0 will be the base time which all other times will be
|
288
|
282
|
// set relative to.
|
289
|
|
- clock_gettime(CLOCK_REALTIME,&t0);
|
|
283
|
+ cmTimeGet(&t0);
|
290
|
284
|
t2 = t0;
|
291
|
285
|
t2.tv_sec = 0;
|
292
|
286
|
|
|
@@ -295,7 +289,7 @@ void _cmMfpTestTimer()
|
295
|
289
|
cmSleepUs(suspendUsecs);
|
296
|
290
|
|
297
|
291
|
|
298
|
|
- clock_gettime(CLOCK_REALTIME,&t1);
|
|
292
|
+ cmTimeGet(&t1);
|
299
|
293
|
t1.tv_sec -= t0.tv_sec;
|
300
|
294
|
|
301
|
295
|
unsigned d0usec = _cmMfpElapsedMicroSecs(&t0,&t1);
|
|
@@ -350,7 +344,7 @@ cmMfpRC_t cmMfpTest( const char* fn, cmCtx_t* ctx )
|
350
|
344
|
if((rc = cmMfpSeek( mfpH, 60 * 1000000 )) != kOkMfpRC )
|
351
|
345
|
goto errLabel;
|
352
|
346
|
|
353
|
|
- clock_gettime(CLOCK_REALTIME,&base);
|
|
347
|
+ cmTimeGet(&base);
|
354
|
348
|
t0 = base;
|
355
|
349
|
t0.tv_sec = 0;
|
356
|
350
|
|
|
@@ -359,7 +353,7 @@ cmMfpRC_t cmMfpTest( const char* fn, cmCtx_t* ctx )
|
359
|
353
|
{
|
360
|
354
|
cmSleepUs(suspendUsecs);
|
361
|
355
|
|
362
|
|
- clock_gettime(CLOCK_REALTIME,&t1);
|
|
356
|
+ cmTimeGet(&t1);
|
363
|
357
|
t1.tv_sec -= base.tv_sec;
|
364
|
358
|
|
365
|
359
|
unsigned dusecs = _cmMfpElapsedMicroSecs(&t0,&t1);
|