boost_has_pthread_delay_np.ipp 695 B

1234567891011121314151617181920212223242526272829303132333435
  1. // (C) Copyright John Maddock 2001.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/config for most recent version.
  6. // MACRO: BOOST_HAS_PTHREAD_DELAY_NP
  7. // TITLE: pthread_delay_np
  8. // DESCRIPTION: The platform supports non-standard pthread_delay_np API.
  9. #include <pthread.h>
  10. #include <time.h>
  11. namespace boost_has_pthread_delay_np{
  12. void f()
  13. {
  14. // this is never called, it just has to compile:
  15. timespec ts;
  16. int res = pthread_delay_np(&ts);
  17. }
  18. int test()
  19. {
  20. return 0;
  21. }
  22. }