BVB Source Codes

mars Show thread_clock.hpp Source code

Return Download mars: download thread_clock.hpp Source code - Download mars Source code - Type:.hpp
  1. //  boost/chrono/thread_clock.hpp  -----------------------------------------------------------//
  2.  
  3. //  Copyright 2009-2011 Vicente J. Botet Escriba
  4.  
  5. //  Distributed under the Boost Software License, Version 1.0.
  6. //  See http://www.boost.org/LICENSE_1_0.txt
  7.  
  8. //  See http://www.boost.org/libs/system for documentation.
  9.  
  10. #include <boost/chrono/config.hpp>
  11.  
  12. #ifndef BOOST_CHRONO_THREAD_CLOCK_HPP
  13. #define BOOST_CHRONO_THREAD_CLOCK_HPP
  14.  
  15. #if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
  16.  
  17. #include <boost/chrono/config.hpp>
  18. #include <boost/chrono/duration.hpp>
  19. #include <boost/chrono/time_point.hpp>
  20. #include <boost/chrono/detail/system.hpp>
  21. #include <boost/chrono/clock_string.hpp>
  22.  
  23. #ifndef BOOST_CHRONO_HEADER_ONLY
  24. #include <boost/config/abi_prefix.hpp> // must be the last #include
  25. #endif
  26.  
  27. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost { namespace chrono {
  28.  
  29. class BOOST_CHRONO_DECL thread_clock {
  30. public:
  31.     typedef nanoseconds                          duration;
  32.     typedef duration::rep                        rep;
  33.     typedef duration::period                     period;
  34.     typedef chrono::time_point<thread_clock>    time_point;
  35.     BOOST_STATIC_CONSTEXPR bool is_steady =             BOOST_CHRONO_THREAD_CLOCK_IS_STEADY;
  36.  
  37.     static BOOST_CHRONO_INLINE time_point now( ) BOOST_NOEXCEPT;
  38. #if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
  39.     static BOOST_CHRONO_INLINE time_point now( system::error_code & ec );
  40. #endif
  41. };
  42.  
  43. template <class CharT>
  44. struct clock_string<thread_clock, CharT>
  45. {
  46.   static std::basic_string<CharT> name()
  47.   {
  48.     static const CharT u[] =
  49.     { 't', 'h', 'r', 'e', 'a', 'd', '_',
  50.       'c', 'l','o', 'c', 'k'};
  51.     static const std::basic_string<CharT> str(u, u + sizeof(u)/sizeof(u[0]));
  52.     return str;
  53.   }
  54.   static std::basic_string<CharT> since()
  55.   {
  56.     const CharT u[] =
  57.     { ' ', 's', 'i', 'n', 'c', 'e', ' ', 't', 'h', 'r', 'e', 'a', 'd', ' ', 's', 't', 'a', 'r', 't', '-', 'u', 'p'};
  58.     const std::basic_string<CharT> str(u, u + sizeof(u)/sizeof(u[0]));
  59.     return str;
  60.   }
  61. };
  62.  
  63. } // namespace chrono
  64. } // namespace mars_boost
  65.  
  66.  
  67. #ifndef BOOST_CHRONO_HEADER_ONLY
  68. #include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
  69. #else
  70. #include <boost/chrono/detail/inlined/thread_clock.hpp>
  71. #endif
  72.  
  73. #endif
  74.  
  75. #endif  // BOOST_CHRONO_THREAD_CLOCK_HPP
  76.  
downloadthread_clock.hpp Source code - Download mars Source code
Related Source Codes/Software:
Hero - Elegant transition library for iOS & tvOS 2017-06-09
deep-photo-styletransfer - Code and data for paper "Deep Photo Style Transfer... 2017-06-09
mastodon - A GNU Social-compatible microblogging server ... 2017-06-09
plyr - A simple HTML5, YouTube and Vimeo player ... 2017-06-08
prepack - Prepack is a partial evaluator for JavaScript. Pre... 2017-06-08
Public-APIs - 2017-06-09
lottie-ios - An iOS library to natively render After Effects ve... 2017-06-09
Awesome-Hacking - A collection of various awesome lists for hackers,... 2017-06-09
algorithms - Minimal examples of data structures and algorithms... 2017-06-10
lectures - Oxford Deep NLP 2017 course 2017-06-10
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top