summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pchrono.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2019-09-29 00:31:30 +0200
committer couriersud <couriersud@gmx.org>2019-09-29 00:31:30 +0200
commitcc8114f39463d338030fa48025d7fa27d5df981b (patch)
tree4d7c21676c53fb206f72c76d8d272419760889ca /src/lib/netlist/plib/pchrono.cpp
parent5ad9faa783b27c2744dee5f182fc94a885d47e34 (diff)
netlist: less cpp - more headers (nw)
- move more code in headers - delete some cpp files.
Diffstat (limited to 'src/lib/netlist/plib/pchrono.cpp')
-rw-r--r--src/lib/netlist/plib/pchrono.cpp79
1 files changed, 0 insertions, 79 deletions
diff --git a/src/lib/netlist/plib/pchrono.cpp b/src/lib/netlist/plib/pchrono.cpp
deleted file mode 100644
index 354a2589851..00000000000
--- a/src/lib/netlist/plib/pchrono.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// license:GPL-2.0+
-// copyright-holders:Couriersud
-
-#if 0
-
-#include "pchrono.h"
-
-namespace plib {
-namespace chrono {
-#if defined(__x86_64__) && !defined(_clang__) && !defined(_MSC_VER) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6))
-
-template <typename T>
-auto per_sec() -> typename T :: type
-{
- using ret_type = typename T :: type;
- static ret_type persec = 0;
- if (persec == 0)
- {
- ret_type x = 0;
- system_ticks::type t = system_ticks::start();
- system_ticks::type e;
- x = - T :: start();
- do {
- e = system_ticks::stop();
- } while (e - t < system_ticks::per_second() / 100 );
- x += T :: stop();
- persec = (ret_type)(double)((double) x * (double) system_ticks::per_second() / double (e - t));
- }
- return persec;
-}
-
-
-fast_ticks::type fast_ticks::per_second()
-{
-#if 1
- return per_sec<fast_ticks>();
-#else
- static type persec = 0;
- if (persec == 0)
- {
- type x = 0;
- system_ticks::type t = system_ticks::start();
- system_ticks::type e;
- x = -start();
- do {
- e = system_ticks::stop();
- } while (e - t < system_ticks::per_second() / 100 );
- x += stop();
- persec = (type)(double)((double) x * (double) system_ticks::per_second() / double (e - t));
- }
- return persec;
-#endif
-}
-
-#if PUSE_ACCURATE_STATS && PHAS_RDTSCP
-exact_ticks::type exact_ticks::per_second()
-{
- static type persec = 0;
- if (persec == 0)
- {
- type x = 0;
- system_ticks::type t = system_ticks::start();
- system_ticks::type e;
- x = -start();
- do {
- e = system_ticks::stop();
- } while (e - t < system_ticks::per_second() / 100 );
- x += stop();
- persec = (type)(double)((double) x * (double) system_ticks::per_second() / double (e - t));
- }
- return persec;
-}
-#endif
-
-#endif
-
-} // namespace chrono
-} // namespace plib
-#endif