blob: 5df1bc80d40d4dd9a88ac0f784c811008418e13e (
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
37
38
39
40
41
42
43
44
|
#ifndef __PerfUtils_hpp__
#define __PerfUtils_hpp__ 1
// =================================================================================================
// Copyright 2006 Adobe
// All Rights Reserved.
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
// of the Adobe license agreement accompanying it.
// =================================================================================================
#include "public/include/XMP_Environment.h"
#if XMP_MacBuild
#include <CoreServices/CoreServices.h>
#elif XMP_WinBuild
#include <Windows.h>
#elif XMP_UNIXBuild | XMP_iOSBuild | XMP_AndroidBuild
#include <time.h>
#endif
namespace PerfUtils {
#if XMP_WinBuild
// typedef LARGE_INTEGER MomentValue;
typedef LONGLONG MomentValue;
static const MomentValue kZeroMoment = 0;
#elif XMP_UNIXBuild | XMP_AndroidBuild
typedef struct timespec MomentValue;
static const MomentValue kZeroMoment = {0, 0};
#elif XMP_iOSBuild | XMP_MacBuild
typedef uint64_t MomentValue;
static const MomentValue kZeroMoment = 0;
#endif
const char * GetTimerInfo();
MomentValue NoteThisMoment();
double GetElapsedSeconds ( MomentValue start, MomentValue finish );
}; // PerfUtils
#endif // __PerfUtils_hpp__
|