time.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // -*- C++ -*- compatibility header.
  2. // Copyright (C) 2002-2022 Free Software Foundation, Inc.
  3. //
  4. // This file is part of the GNU ISO C++ Library. This library is free
  5. // software; you can redistribute it and/or modify it under the
  6. // terms of the GNU General Public License as published by the
  7. // Free Software Foundation; either version 3, or (at your option)
  8. // any later version.
  9. // This library is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. // Under Section 7 of GPL version 3, you are granted additional
  14. // permissions described in the GCC Runtime Library Exception, version
  15. // 3.1, as published by the Free Software Foundation.
  16. // You should have received a copy of the GNU General Public License and
  17. // a copy of the GCC Runtime Library Exception along with this program;
  18. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. // <http://www.gnu.org/licenses/>.
  20. /** @file time.h
  21. * This is a Standard C++ Library header.
  22. */
  23. #include <ctime>
  24. #ifndef _GLIBCXX_TIME_H
  25. #define _GLIBCXX_TIME_H 1
  26. #ifdef _GLIBCXX_NAMESPACE_C
  27. // Get rid of those macros defined in <time.h> in lieu of real functions.
  28. #undef clock
  29. #undef difftime
  30. #undef mktime
  31. #undef time
  32. #undef asctime
  33. #undef ctime
  34. #undef gmtime
  35. #undef localtime
  36. #undef strftime
  37. using std::clock_t;
  38. using std::time_t;
  39. using std::tm;
  40. using std::clock;
  41. using std::difftime;
  42. using std::mktime;
  43. using std::time;
  44. using std::asctime;
  45. using std::ctime;
  46. using std::gmtime;
  47. using std::localtime;
  48. using std::strftime;
  49. #endif
  50. #endif