diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-09-10 06:46:36 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2015-09-10 06:46:36 +0000 |
commit | 659ec263572821f752f87ea4f7e4c13fcdd20461 (patch) | |
tree | 7809867cbb197f2ce93588b4077fd124a8f07a50 /Build/source/libs/poppler/poppler-0.36.0/goo/GooTimer.h | |
parent | 1b3f4adac0a1d65102e83e1adb1f45d2ad35eb22 (diff) |
poppler 0.36.0
git-svn-id: svn://tug.org/texlive/trunk@38335 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/poppler/poppler-0.36.0/goo/GooTimer.h')
-rw-r--r-- | Build/source/libs/poppler/poppler-0.36.0/goo/GooTimer.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Build/source/libs/poppler/poppler-0.36.0/goo/GooTimer.h b/Build/source/libs/poppler/poppler-0.36.0/goo/GooTimer.h new file mode 100644 index 00000000000..ac64f6b4868 --- /dev/null +++ b/Build/source/libs/poppler/poppler-0.36.0/goo/GooTimer.h @@ -0,0 +1,62 @@ +//======================================================================== +// +// GooTimer.cc +// +// This file is licensed under GPLv2 or later +// +// Copyright 2005 Jonathan Blandford <jrb@redhat.com> +// Copyright 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com> +// Copyright 2010 Hib Eris <hib@hiberis.nl> +// Copyright 2011 Albert Astals cid <aacid@kde.org> +// Copyright 2014 Bogdan Cristea <cristeab@gmail.com> +// Copyright 2014 Peter Breitenlohner <peb@mppmu.mpg.de> +// Inspired by gtimer.c in glib, which is Copyright 2000 by the GLib Team +// +//======================================================================== + +#ifndef GOOTIMER_H +#define GOOTIMER_H + +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + +#include "poppler-config.h" +#include "gtypes.h" +#ifdef HAVE_GETTIMEOFDAY +#include <sys/time.h> +#endif + +#ifdef _WIN32 +#ifndef NOMINMAX +#define NOMINMAX +#endif +#include <windows.h> +#endif + +//------------------------------------------------------------------------ +// GooTimer +//------------------------------------------------------------------------ + +class GooTimer { +public: + + // Create a new timer. + GooTimer(); + + void start(); + void stop(); + double getElapsed(); + +private: +#ifdef HAVE_GETTIMEOFDAY + struct timeval start_time; + struct timeval end_time; +#elif defined(_WIN32) + LARGE_INTEGER start_time; + LARGE_INTEGER end_time; +#endif + GBool active; +}; + +#endif |