aboutsummaryrefslogtreecommitdiff
path: root/build/tools/HLSLcc/May_2014/offline/timer.h
blob: 05d6b0f485a2eec7330fbea44da05105fc262117 (plain) (blame)
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
#ifndef TIMER_H
#define TIMER_H

#ifdef _WIN32
#include <Windows.h>
#else
#include <sys/time.h>
#endif

typedef struct
{
#ifdef _WIN32
    LARGE_INTEGER frequency;
    LARGE_INTEGER startCount;
    LARGE_INTEGER endCount;
#else
    struct timeval startCount;
    struct timeval endCount;
#endif
} Timer_t;

void InitTimer(Timer_t* psTimer);
void ResetTimer(Timer_t* psTimer);
double ReadTimer(Timer_t* psTimer);

#endif