~ubuntu-branches/ubuntu/jaunty/poppler/jaunty-security

1 by Adam Conrad
Import upstream version 0.4.2
1
//========================================================================
2
//
1.1.18 by Sebastien Bacher
Import upstream version 0.10.3
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
1 by Adam Conrad
Import upstream version 0.4.2
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"
1.1.12 by Loic Minier
Import upstream version 0.8.2
21
#ifdef HAVE_GETTIMEOFDAY
1 by Adam Conrad
Import upstream version 0.4.2
22
#include <sys/time.h>
1.1.12 by Loic Minier
Import upstream version 0.8.2
23
#endif
24
25
#ifdef _MSC_VER
26
#include <windows.h>
27
#endif
1 by Adam Conrad
Import upstream version 0.4.2
28
29
//------------------------------------------------------------------------
1.1.12 by Loic Minier
Import upstream version 0.8.2
30
// GooTimer
1 by Adam Conrad
Import upstream version 0.4.2
31
//------------------------------------------------------------------------
32
33
class GooTimer {
34
public:
35
36
  // Create a new timer.
37
  GooTimer();
38
1.1.12 by Loic Minier
Import upstream version 0.8.2
39
  void start();
40
  void stop();
1 by Adam Conrad
Import upstream version 0.4.2
41
  double getElapsed();
42
43
private:
1.1.12 by Loic Minier
Import upstream version 0.8.2
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;
1 by Adam Conrad
Import upstream version 0.4.2
52
};
53
54
#endif