summaryrefslogtreecommitdiff
path: root/Build/source/libs/poppler/poppler-0.32.0/goo/GooTimer.cc
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2015-06-12 09:16:27 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2015-06-12 09:16:27 +0000
commit651ca331cd7943896e894fd42cf13fa1d012347f (patch)
tree8a911c2b5c3f6fb05b53a5a03ccd2614c24ac2c1 /Build/source/libs/poppler/poppler-0.32.0/goo/GooTimer.cc
parent4403160cd26a0ba4eb014d69bfb9dcd568f64fc6 (diff)
freetype 2.6
git-svn-id: svn://tug.org/texlive/trunk@37505 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/poppler/poppler-0.32.0/goo/GooTimer.cc')
-rw-r--r--Build/source/libs/poppler/poppler-0.32.0/goo/GooTimer.cc95
1 files changed, 0 insertions, 95 deletions
diff --git a/Build/source/libs/poppler/poppler-0.32.0/goo/GooTimer.cc b/Build/source/libs/poppler/poppler-0.32.0/goo/GooTimer.cc
deleted file mode 100644
index c766c6bf2e4..00000000000
--- a/Build/source/libs/poppler/poppler-0.32.0/goo/GooTimer.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-//========================================================================
-//
-// 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>
-// Inspired by gtimer.c in glib, which is Copyright 2000 by the GLib Team
-//
-//========================================================================
-
-#include <config.h>
-
-#ifdef USE_GCC_PRAGMAS
-#pragma implementation
-#endif
-
-#include "GooTimer.h"
-#include <string.h>
-
-#define USEC_PER_SEC 1000000
-
-//------------------------------------------------------------------------
-// GooTimer
-//------------------------------------------------------------------------
-
-GooTimer::GooTimer() {
- start();
-}
-
-void GooTimer::start() {
-#ifdef HAVE_GETTIMEOFDAY
- gettimeofday(&start_time, NULL);
-#elif defined(_WIN32)
- QueryPerformanceCounter(&start_time);
-#endif
- active = true;
-}
-
-void GooTimer::stop() {
-#ifdef HAVE_GETTIMEOFDAY
- gettimeofday(&end_time, NULL);
-#elif defined(_WIN32)
- QueryPerformanceCounter(&end_time);
-#endif
- active = false;
-}
-
-#ifdef HAVE_GETTIMEOFDAY
-double GooTimer::getElapsed()
-{
- double total;
- struct timeval elapsed;
-
- if (active)
- gettimeofday(&end_time, NULL);
-
- if (start_time.tv_usec > end_time.tv_usec) {
- end_time.tv_usec += USEC_PER_SEC;
- end_time.tv_sec--;
- }
-
- elapsed.tv_usec = end_time.tv_usec - start_time.tv_usec;
- elapsed.tv_sec = end_time.tv_sec - start_time.tv_sec;
-
- total = elapsed.tv_sec + ((double) elapsed.tv_usec / 1e6);
- if (total < 0)
- total = 0;
-
- return total;
-}
-#elif defined(_WIN32)
-double GooTimer::getElapsed()
-{
- LARGE_INTEGER freq;
- double time_in_secs;
- QueryPerformanceFrequency(&freq);
-
- if (active)
- QueryPerformanceCounter(&end_time);
-
- time_in_secs = (double)(end_time.QuadPart-start_time.QuadPart)/(double)freq.QuadPart;
- return time_in_secs * 1000.0;
-
-}
-#else
-double GooTimer::getElapsed()
-{
-#warning "no support for GooTimer"
- return 0;
-}
-#endif
-