Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include
File: time.h
/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
[0] Fix | Delete
This file is part of the GNU C Library.
[1] Fix | Delete
[2] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[3] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[4] Fix | Delete
License as published by the Free Software Foundation; either
[5] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[6] Fix | Delete
[7] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[8] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[9] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[10] Fix | Delete
Lesser General Public License for more details.
[11] Fix | Delete
[12] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[13] Fix | Delete
License along with the GNU C Library; if not, see
[14] Fix | Delete
<http://www.gnu.org/licenses/>. */
[15] Fix | Delete
[16] Fix | Delete
/*
[17] Fix | Delete
* ISO C99 Standard: 7.23 Date and time <time.h>
[18] Fix | Delete
*/
[19] Fix | Delete
[20] Fix | Delete
#ifndef _TIME_H
[21] Fix | Delete
#define _TIME_H 1
[22] Fix | Delete
[23] Fix | Delete
#include <features.h>
[24] Fix | Delete
[25] Fix | Delete
#define __need_size_t
[26] Fix | Delete
#define __need_NULL
[27] Fix | Delete
#include <stddef.h>
[28] Fix | Delete
[29] Fix | Delete
/* This defines CLOCKS_PER_SEC, which is the number of processor clock
[30] Fix | Delete
ticks per second, and possibly a number of other constants. */
[31] Fix | Delete
#include <bits/time.h>
[32] Fix | Delete
[33] Fix | Delete
/* Many of the typedefs and structs whose official home is this header
[34] Fix | Delete
may also need to be defined by other headers. */
[35] Fix | Delete
#include <bits/types/clock_t.h>
[36] Fix | Delete
#include <bits/types/time_t.h>
[37] Fix | Delete
#include <bits/types/struct_tm.h>
[38] Fix | Delete
[39] Fix | Delete
#if defined __USE_POSIX199309 || defined __USE_ISOC11
[40] Fix | Delete
# include <bits/types/struct_timespec.h>
[41] Fix | Delete
#endif
[42] Fix | Delete
[43] Fix | Delete
#ifdef __USE_POSIX199309
[44] Fix | Delete
# include <bits/types/clockid_t.h>
[45] Fix | Delete
# include <bits/types/timer_t.h>
[46] Fix | Delete
# include <bits/types/struct_itimerspec.h>
[47] Fix | Delete
struct sigevent;
[48] Fix | Delete
#endif
[49] Fix | Delete
[50] Fix | Delete
#ifdef __USE_XOPEN2K
[51] Fix | Delete
# ifndef __pid_t_defined
[52] Fix | Delete
typedef __pid_t pid_t;
[53] Fix | Delete
# define __pid_t_defined
[54] Fix | Delete
# endif
[55] Fix | Delete
#endif
[56] Fix | Delete
[57] Fix | Delete
#ifdef __USE_XOPEN2K8
[58] Fix | Delete
# include <bits/types/locale_t.h>
[59] Fix | Delete
#endif
[60] Fix | Delete
[61] Fix | Delete
#ifdef __USE_ISOC11
[62] Fix | Delete
/* Time base values for timespec_get. */
[63] Fix | Delete
# define TIME_UTC 1
[64] Fix | Delete
#endif
[65] Fix | Delete
[66] Fix | Delete
__BEGIN_DECLS
[67] Fix | Delete
[68] Fix | Delete
/* Time used by the program so far (user time + system time).
[69] Fix | Delete
The result / CLOCKS_PER_SEC is program time in seconds. */
[70] Fix | Delete
extern clock_t clock (void) __THROW;
[71] Fix | Delete
[72] Fix | Delete
/* Return the current time and put it in *TIMER if TIMER is not NULL. */
[73] Fix | Delete
extern time_t time (time_t *__timer) __THROW;
[74] Fix | Delete
[75] Fix | Delete
/* Return the difference between TIME1 and TIME0. */
[76] Fix | Delete
extern double difftime (time_t __time1, time_t __time0)
[77] Fix | Delete
__THROW __attribute__ ((__const__));
[78] Fix | Delete
[79] Fix | Delete
/* Return the `time_t' representation of TP and normalize TP. */
[80] Fix | Delete
extern time_t mktime (struct tm *__tp) __THROW;
[81] Fix | Delete
[82] Fix | Delete
[83] Fix | Delete
/* Format TP into S according to FORMAT.
[84] Fix | Delete
Write no more than MAXSIZE characters and return the number
[85] Fix | Delete
of characters written, or 0 if it would exceed MAXSIZE. */
[86] Fix | Delete
extern size_t strftime (char *__restrict __s, size_t __maxsize,
[87] Fix | Delete
const char *__restrict __format,
[88] Fix | Delete
const struct tm *__restrict __tp) __THROW;
[89] Fix | Delete
[90] Fix | Delete
#ifdef __USE_XOPEN
[91] Fix | Delete
/* Parse S according to FORMAT and store binary time information in TP.
[92] Fix | Delete
The return value is a pointer to the first unparsed character in S. */
[93] Fix | Delete
extern char *strptime (const char *__restrict __s,
[94] Fix | Delete
const char *__restrict __fmt, struct tm *__tp)
[95] Fix | Delete
__THROW;
[96] Fix | Delete
#endif
[97] Fix | Delete
[98] Fix | Delete
#ifdef __USE_XOPEN2K8
[99] Fix | Delete
/* Similar to the two functions above but take the information from
[100] Fix | Delete
the provided locale and not the global locale. */
[101] Fix | Delete
[102] Fix | Delete
extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
[103] Fix | Delete
const char *__restrict __format,
[104] Fix | Delete
const struct tm *__restrict __tp,
[105] Fix | Delete
locale_t __loc) __THROW;
[106] Fix | Delete
#endif
[107] Fix | Delete
[108] Fix | Delete
#ifdef __USE_GNU
[109] Fix | Delete
extern char *strptime_l (const char *__restrict __s,
[110] Fix | Delete
const char *__restrict __fmt, struct tm *__tp,
[111] Fix | Delete
locale_t __loc) __THROW;
[112] Fix | Delete
#endif
[113] Fix | Delete
[114] Fix | Delete
[115] Fix | Delete
/* Return the `struct tm' representation of *TIMER
[116] Fix | Delete
in Universal Coordinated Time (aka Greenwich Mean Time). */
[117] Fix | Delete
extern struct tm *gmtime (const time_t *__timer) __THROW;
[118] Fix | Delete
[119] Fix | Delete
/* Return the `struct tm' representation
[120] Fix | Delete
of *TIMER in the local timezone. */
[121] Fix | Delete
extern struct tm *localtime (const time_t *__timer) __THROW;
[122] Fix | Delete
[123] Fix | Delete
#ifdef __USE_POSIX
[124] Fix | Delete
/* Return the `struct tm' representation of *TIMER in UTC,
[125] Fix | Delete
using *TP to store the result. */
[126] Fix | Delete
extern struct tm *gmtime_r (const time_t *__restrict __timer,
[127] Fix | Delete
struct tm *__restrict __tp) __THROW;
[128] Fix | Delete
[129] Fix | Delete
/* Return the `struct tm' representation of *TIMER in local time,
[130] Fix | Delete
using *TP to store the result. */
[131] Fix | Delete
extern struct tm *localtime_r (const time_t *__restrict __timer,
[132] Fix | Delete
struct tm *__restrict __tp) __THROW;
[133] Fix | Delete
#endif /* POSIX */
[134] Fix | Delete
[135] Fix | Delete
/* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n"
[136] Fix | Delete
that is the representation of TP in this format. */
[137] Fix | Delete
extern char *asctime (const struct tm *__tp) __THROW;
[138] Fix | Delete
[139] Fix | Delete
/* Equivalent to `asctime (localtime (timer))'. */
[140] Fix | Delete
extern char *ctime (const time_t *__timer) __THROW;
[141] Fix | Delete
[142] Fix | Delete
#ifdef __USE_POSIX
[143] Fix | Delete
/* Reentrant versions of the above functions. */
[144] Fix | Delete
[145] Fix | Delete
/* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n"
[146] Fix | Delete
that is the representation of TP in this format. */
[147] Fix | Delete
extern char *asctime_r (const struct tm *__restrict __tp,
[148] Fix | Delete
char *__restrict __buf) __THROW;
[149] Fix | Delete
[150] Fix | Delete
/* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */
[151] Fix | Delete
extern char *ctime_r (const time_t *__restrict __timer,
[152] Fix | Delete
char *__restrict __buf) __THROW;
[153] Fix | Delete
#endif /* POSIX */
[154] Fix | Delete
[155] Fix | Delete
[156] Fix | Delete
/* Defined in localtime.c. */
[157] Fix | Delete
extern char *__tzname[2]; /* Current timezone names. */
[158] Fix | Delete
extern int __daylight; /* If daylight-saving time is ever in use. */
[159] Fix | Delete
extern long int __timezone; /* Seconds west of UTC. */
[160] Fix | Delete
[161] Fix | Delete
[162] Fix | Delete
#ifdef __USE_POSIX
[163] Fix | Delete
/* Same as above. */
[164] Fix | Delete
extern char *tzname[2];
[165] Fix | Delete
[166] Fix | Delete
/* Set time conversion information from the TZ environment variable.
[167] Fix | Delete
If TZ is not defined, a locale-dependent default is used. */
[168] Fix | Delete
extern void tzset (void) __THROW;
[169] Fix | Delete
#endif
[170] Fix | Delete
[171] Fix | Delete
#if defined __USE_MISC || defined __USE_XOPEN
[172] Fix | Delete
extern int daylight;
[173] Fix | Delete
extern long int timezone;
[174] Fix | Delete
#endif
[175] Fix | Delete
[176] Fix | Delete
#ifdef __USE_MISC
[177] Fix | Delete
/* Set the system time to *WHEN.
[178] Fix | Delete
This call is restricted to the superuser. */
[179] Fix | Delete
extern int stime (const time_t *__when) __THROW;
[180] Fix | Delete
#endif
[181] Fix | Delete
[182] Fix | Delete
[183] Fix | Delete
/* Nonzero if YEAR is a leap year (every 4 years,
[184] Fix | Delete
except every 100th isn't, and every 400th is). */
[185] Fix | Delete
#define __isleap(year) \
[186] Fix | Delete
((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
[187] Fix | Delete
[188] Fix | Delete
[189] Fix | Delete
#ifdef __USE_MISC
[190] Fix | Delete
/* Miscellaneous functions many Unices inherited from the public domain
[191] Fix | Delete
localtime package. These are included only for compatibility. */
[192] Fix | Delete
[193] Fix | Delete
/* Like `mktime', but for TP represents Universal Time, not local time. */
[194] Fix | Delete
extern time_t timegm (struct tm *__tp) __THROW;
[195] Fix | Delete
[196] Fix | Delete
/* Another name for `mktime'. */
[197] Fix | Delete
extern time_t timelocal (struct tm *__tp) __THROW;
[198] Fix | Delete
[199] Fix | Delete
/* Return the number of days in YEAR. */
[200] Fix | Delete
extern int dysize (int __year) __THROW __attribute__ ((__const__));
[201] Fix | Delete
#endif
[202] Fix | Delete
[203] Fix | Delete
[204] Fix | Delete
#ifdef __USE_POSIX199309
[205] Fix | Delete
/* Pause execution for a number of nanoseconds.
[206] Fix | Delete
[207] Fix | Delete
This function is a cancellation point and therefore not marked with
[208] Fix | Delete
__THROW. */
[209] Fix | Delete
extern int nanosleep (const struct timespec *__requested_time,
[210] Fix | Delete
struct timespec *__remaining);
[211] Fix | Delete
[212] Fix | Delete
[213] Fix | Delete
/* Get resolution of clock CLOCK_ID. */
[214] Fix | Delete
extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;
[215] Fix | Delete
[216] Fix | Delete
/* Get current value of clock CLOCK_ID and store it in TP. */
[217] Fix | Delete
extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
[218] Fix | Delete
[219] Fix | Delete
/* Set clock CLOCK_ID to value TP. */
[220] Fix | Delete
extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
[221] Fix | Delete
__THROW;
[222] Fix | Delete
[223] Fix | Delete
# ifdef __USE_XOPEN2K
[224] Fix | Delete
/* High-resolution sleep with the specified clock.
[225] Fix | Delete
[226] Fix | Delete
This function is a cancellation point and therefore not marked with
[227] Fix | Delete
__THROW. */
[228] Fix | Delete
extern int clock_nanosleep (clockid_t __clock_id, int __flags,
[229] Fix | Delete
const struct timespec *__req,
[230] Fix | Delete
struct timespec *__rem);
[231] Fix | Delete
[232] Fix | Delete
/* Return clock ID for CPU-time clock. */
[233] Fix | Delete
extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
[234] Fix | Delete
# endif
[235] Fix | Delete
[236] Fix | Delete
[237] Fix | Delete
/* Create new per-process timer using CLOCK_ID. */
[238] Fix | Delete
extern int timer_create (clockid_t __clock_id,
[239] Fix | Delete
struct sigevent *__restrict __evp,
[240] Fix | Delete
timer_t *__restrict __timerid) __THROW;
[241] Fix | Delete
[242] Fix | Delete
/* Delete timer TIMERID. */
[243] Fix | Delete
extern int timer_delete (timer_t __timerid) __THROW;
[244] Fix | Delete
[245] Fix | Delete
/* Set timer TIMERID to VALUE, returning old value in OVALUE. */
[246] Fix | Delete
extern int timer_settime (timer_t __timerid, int __flags,
[247] Fix | Delete
const struct itimerspec *__restrict __value,
[248] Fix | Delete
struct itimerspec *__restrict __ovalue) __THROW;
[249] Fix | Delete
[250] Fix | Delete
/* Get current value of timer TIMERID and store it in VALUE. */
[251] Fix | Delete
extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
[252] Fix | Delete
__THROW;
[253] Fix | Delete
[254] Fix | Delete
/* Get expiration overrun for timer TIMERID. */
[255] Fix | Delete
extern int timer_getoverrun (timer_t __timerid) __THROW;
[256] Fix | Delete
#endif
[257] Fix | Delete
[258] Fix | Delete
[259] Fix | Delete
#ifdef __USE_ISOC11
[260] Fix | Delete
/* Set TS to calendar time based in time base BASE. */
[261] Fix | Delete
extern int timespec_get (struct timespec *__ts, int __base)
[262] Fix | Delete
__THROW __nonnull ((1));
[263] Fix | Delete
#endif
[264] Fix | Delete
[265] Fix | Delete
[266] Fix | Delete
#ifdef __USE_XOPEN_EXTENDED
[267] Fix | Delete
/* Set to one of the following values to indicate an error.
[268] Fix | Delete
1 the DATEMSK environment variable is null or undefined,
[269] Fix | Delete
2 the template file cannot be opened for reading,
[270] Fix | Delete
3 failed to get file status information,
[271] Fix | Delete
4 the template file is not a regular file,
[272] Fix | Delete
5 an error is encountered while reading the template file,
[273] Fix | Delete
6 memory allication failed (not enough memory available),
[274] Fix | Delete
7 there is no line in the template that matches the input,
[275] Fix | Delete
8 invalid input specification Example: February 31 or a time is
[276] Fix | Delete
specified that can not be represented in a time_t (representing
[277] Fix | Delete
the time in seconds since 00:00:00 UTC, January 1, 1970) */
[278] Fix | Delete
extern int getdate_err;
[279] Fix | Delete
[280] Fix | Delete
/* Parse the given string as a date specification and return a value
[281] Fix | Delete
representing the value. The templates from the file identified by
[282] Fix | Delete
the environment variable DATEMSK are used. In case of an error
[283] Fix | Delete
`getdate_err' is set.
[284] Fix | Delete
[285] Fix | Delete
This function is a possible cancellation point and therefore not
[286] Fix | Delete
marked with __THROW. */
[287] Fix | Delete
extern struct tm *getdate (const char *__string);
[288] Fix | Delete
#endif
[289] Fix | Delete
[290] Fix | Delete
#ifdef __USE_GNU
[291] Fix | Delete
/* Since `getdate' is not reentrant because of the use of `getdate_err'
[292] Fix | Delete
and the static buffer to return the result in, we provide a thread-safe
[293] Fix | Delete
variant. The functionality is the same. The result is returned in
[294] Fix | Delete
the buffer pointed to by RESBUFP and in case of an error the return
[295] Fix | Delete
value is != 0 with the same values as given above for `getdate_err'.
[296] Fix | Delete
[297] Fix | Delete
This function is not part of POSIX and therefore no official
[298] Fix | Delete
cancellation point. But due to similarity with an POSIX interface
[299] Fix | Delete
or due to the implementation it is a cancellation point and
[300] Fix | Delete
therefore not marked with __THROW. */
[301] Fix | Delete
extern int getdate_r (const char *__restrict __string,
[302] Fix | Delete
struct tm *__restrict __resbufp);
[303] Fix | Delete
#endif
[304] Fix | Delete
[305] Fix | Delete
__END_DECLS
[306] Fix | Delete
[307] Fix | Delete
#endif /* time.h. */
[308] Fix | Delete
[309] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function