boost_has_gettimeofday.ipp 679 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_GETTIMEOFDAY
  7. // TITLE: gettimeofday
  8. // DESCRIPTION: The platform supports POSIX standard API gettimeofday.
  9. #include <sys/time.h>
  10. namespace boost_has_gettimeofday{
  11. void f()
  12. {
  13. // this is never called, it just has to compile:
  14. timeval tp;
  15. int res = gettimeofday(&tp, 0);
  16. (void) &res;
  17. }
  18. int test()
  19. {
  20. return 0;
  21. }
  22. }