summaryrefslogtreecommitdiff
path: root/libs/context/performance/zeit.hpp
diff options
context:
space:
mode:
authorMyoungJune Park <mj2004.park@samsung.com>2017-12-12 00:34:12 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2017-12-12 00:34:12 +0000
commit2ab0cbf4ec245d3fa9fe7a84f5b33a68fb7e2634 (patch)
tree2c5492193391766d93e7b2bdcca24ffdeac5d971 /libs/context/performance/zeit.hpp
parente25981c0660b336901b493d886df877bf38565d9 (diff)
parent478965830fb46d8657e788cda69eec06532831a4 (diff)
downloadboost-submit/tizen/20180306.073050.tar.gz
boost-submit/tizen/20180306.073050.tar.bz2
boost-submit/tizen/20180306.073050.zip
Merge changes If2c80731,I845d4c63,Ied0dae31 into tizensubmit/tizen/20180614.070240submit/tizen/20180306.073050
* changes: Bump to boost 1.65.1 Merge branch 'tizen' of ssh://review.tizen.org:29418/platform/upstream/boost into tizen Rebase for boot 1.65.1
Diffstat (limited to 'libs/context/performance/zeit.hpp')
-rw-r--r--libs/context/performance/zeit.hpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/libs/context/performance/zeit.hpp b/libs/context/performance/zeit.hpp
deleted file mode 100644
index 2c082bf220..0000000000
--- a/libs/context/performance/zeit.hpp
+++ /dev/null
@@ -1,53 +0,0 @@
-
-// Copyright Oliver Kowalke 2009.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef ZEIT_H
-#define ZEIT_H
-
-#include <time.h>
-
-#include <algorithm>
-#include <numeric>
-#include <cstddef>
-#include <vector>
-
-#include <boost/assert.hpp>
-#include <boost/bind.hpp>
-#include <boost/cstdint.hpp>
-
-typedef boost::uint64_t zeit_t;
-
-inline
-zeit_t zeit()
-{
- timespec t;
- ::clock_gettime( CLOCK_PROCESS_CPUTIME_ID, & t);
- return t.tv_sec * 1000000000 + t.tv_nsec;
-}
-
-struct measure_zeit
-{
- zeit_t operator()()
- {
- zeit_t start( zeit() );
- return zeit() - start;
- }
-};
-
-inline
-zeit_t overhead_zeit()
-{
- std::size_t iterations( 10);
- std::vector< zeit_t > overhead( iterations, 0);
- for ( std::size_t i( 0); i < iterations; ++i)
- std::generate(
- overhead.begin(), overhead.end(),
- measure_zeit() );
- BOOST_ASSERT( overhead.begin() != overhead.end() );
- return std::accumulate( overhead.begin(), overhead.end(), 0) / iterations;
-}
-
-#endif // ZEIT_H