source: trunk/poppler/mypoppler/goo/GooTimer.h @ 257

Last change on this file since 257 was 257, checked in by Eugene Romanenko, 13 years ago

PDF plugin: Poppler library updated to version 0.10.0

File size: 1.1 KB
Line 
1//========================================================================
2//
3// GooTimer.cc
4//
5// This file is licensed under GPLv2 or later
6//
7// Copyright 2005 Jonathan Blandford <jrb@redhat.com>
8// Copyright 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
9// Inspired by gtimer.c in glib, which is Copyright 2000 by the GLib Team
10//
11//========================================================================
12
13#ifndef GOOTIMER_H
14#define GOOTIMER_H
15
16#ifdef USE_GCC_PRAGMAS
17#pragma interface
18#endif
19
20#include "gtypes.h"
21#ifdef HAVE_GETTIMEOFDAY
22#include <sys/time.h>
23#endif
24
25#ifdef _MSC_VER
26#include <windows.h>
27#endif
28
29//------------------------------------------------------------------------
30// GooTimer
31//------------------------------------------------------------------------
32
33class GooTimer {
34public:
35
36  // Create a new timer.
37  GooTimer();
38
39  void start();
40  void stop();
41  double getElapsed();
42
43private:
44#ifdef HAVE_GETTIMEOFDAY
45  struct timeval start_time;
46  struct timeval end_time;
47#elif defined(_MSC_VER)
48  LARGE_INTEGER start_time;
49  LARGE_INTEGER end_time;
50#endif
51  GBool active;
52};
53
54#endif
Note: See TracBrowser for help on using the repository browser.