PageRenderTime 37ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/usr/src/lib/libbc/inc/5include/time.h

https://bitbucket.org/a3217055/illumos-2
C Header | 87 lines | 40 code | 10 blank | 37 comment | 0 complexity | 344e3c17075487f7784f05667bb75cb1 MD5 | raw file
Possible License(s): GPL-3.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, AGPL-3.0, BSD-3-Clause, LGPL-2.0, 0BSD, BSD-2-Clause, BSD-3-Clause-No-Nuclear-License-2014, AGPL-1.0, GPL-2.0
  1. /*
  2. * CDDL HEADER START
  3. *
  4. * The contents of this file are subject to the terms of the
  5. * Common Development and Distribution License, Version 1.0 only
  6. * (the "License"). You may not use this file except in compliance
  7. * with the License.
  8. *
  9. * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10. * or http://www.opensolaris.org/os/licensing.
  11. * See the License for the specific language governing permissions
  12. * and limitations under the License.
  13. *
  14. * When distributing Covered Code, include this CDDL HEADER in each
  15. * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16. * If applicable, add the following below this CDDL HEADER, with the
  17. * fields enclosed by brackets "[]" replaced with your own identifying
  18. * information: Portions Copyright [yyyy] [name of copyright owner]
  19. *
  20. * CDDL HEADER END
  21. */
  22. /*
  23. * Copyright 1987 Sun Microsystems, Inc. All rights reserved.
  24. * Use is subject to license terms.
  25. */
  26. /* Copyright (c) 1984 AT&T */
  27. /* All Rights Reserved */
  28. #ifndef __5include_time_h
  29. #define __5include_time_h
  30. #pragma ident "%Z%%M% %I% %E% SMI"
  31. #include <sys/stdtypes.h>
  32. #ifndef NULL
  33. #define NULL 0
  34. #endif
  35. struct tm { /* see ctime(3) */
  36. int tm_sec;
  37. int tm_min;
  38. int tm_hour;
  39. int tm_mday;
  40. int tm_mon;
  41. int tm_year;
  42. int tm_wday;
  43. int tm_yday;
  44. int tm_isdst;
  45. char *tm_zone;
  46. long tm_gmtoff;
  47. };
  48. /*
  49. * Following 2 lines are required to make CLK_TCK work.
  50. * If they change here they have to change in <sys/unistd.h> as well.
  51. */
  52. extern long sysconf(/* int name */);
  53. #define _SC_CLK_TCK 3 /* clock ticks/sec */
  54. /*
  55. * POSIX.1 uses CLK_TCK to specify units used by times(3).
  56. * POSIX.1a doesn't use a name for this and says CLK_TCK is obsolescent, but
  57. * we'll probably have to support it for a long time.
  58. */
  59. #define CLK_TCK (sysconf(_SC_CLK_TCK))
  60. /* 881207 ANSI C draft uses CLOCKS_PER_SEC to specify units used by clock(3). */
  61. #define CLOCKS_PER_SEC 1000000L
  62. extern char * asctime(/* const struct tm *t */);
  63. extern char * ctime(/* const time_t *t */);
  64. extern struct tm * gmtime(/* const time_t *t */);
  65. extern struct tm * localtime(/* const time_t *t */);
  66. extern time_t mktime(/* struct tm *timeptr */);
  67. extern size_t strftime(/* char *s, size_t maxsize, const char *format,
  68. const struct tm *timeptr */);
  69. extern time_t time(/* time_t *t */);
  70. extern void tzset(/* void */);
  71. extern char *tzname[];
  72. #ifndef _POSIX_SOURCE
  73. extern int daylight;
  74. extern long timezone;
  75. extern void tzsetwall(/* void */);
  76. #endif /* !_POSIX_SOURCE */
  77. #endif /* !__5include_time_h */