Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../usr/include/sys
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
#ifndef _SYS_TIME_H
[17] Fix | Delete
#define _SYS_TIME_H 1
[18] Fix | Delete
[19] Fix | Delete
#include <features.h>
[20] Fix | Delete
[21] Fix | Delete
#include <bits/types.h>
[22] Fix | Delete
#include <bits/types/time_t.h>
[23] Fix | Delete
#include <bits/types/struct_timeval.h>
[24] Fix | Delete
[25] Fix | Delete
#ifndef __suseconds_t_defined
[26] Fix | Delete
typedef __suseconds_t suseconds_t;
[27] Fix | Delete
# define __suseconds_t_defined
[28] Fix | Delete
#endif
[29] Fix | Delete
[30] Fix | Delete
#include <sys/select.h>
[31] Fix | Delete
[32] Fix | Delete
__BEGIN_DECLS
[33] Fix | Delete
[34] Fix | Delete
#ifdef __USE_GNU
[35] Fix | Delete
/* Macros for converting between `struct timeval' and `struct timespec'. */
[36] Fix | Delete
# define TIMEVAL_TO_TIMESPEC(tv, ts) { \
[37] Fix | Delete
(ts)->tv_sec = (tv)->tv_sec; \
[38] Fix | Delete
(ts)->tv_nsec = (tv)->tv_usec * 1000; \
[39] Fix | Delete
}
[40] Fix | Delete
# define TIMESPEC_TO_TIMEVAL(tv, ts) { \
[41] Fix | Delete
(tv)->tv_sec = (ts)->tv_sec; \
[42] Fix | Delete
(tv)->tv_usec = (ts)->tv_nsec / 1000; \
[43] Fix | Delete
}
[44] Fix | Delete
#endif
[45] Fix | Delete
[46] Fix | Delete
[47] Fix | Delete
#ifdef __USE_MISC
[48] Fix | Delete
/* Structure crudely representing a timezone.
[49] Fix | Delete
This is obsolete and should never be used. */
[50] Fix | Delete
struct timezone
[51] Fix | Delete
{
[52] Fix | Delete
int tz_minuteswest; /* Minutes west of GMT. */
[53] Fix | Delete
int tz_dsttime; /* Nonzero if DST is ever in effect. */
[54] Fix | Delete
};
[55] Fix | Delete
[56] Fix | Delete
typedef struct timezone *__restrict __timezone_ptr_t;
[57] Fix | Delete
#else
[58] Fix | Delete
typedef void *__restrict __timezone_ptr_t;
[59] Fix | Delete
#endif
[60] Fix | Delete
[61] Fix | Delete
/* Get the current time of day and timezone information,
[62] Fix | Delete
putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
[63] Fix | Delete
Returns 0 on success, -1 on errors.
[64] Fix | Delete
NOTE: This form of timezone information is obsolete.
[65] Fix | Delete
Use the functions and variables declared in <time.h> instead. */
[66] Fix | Delete
extern int gettimeofday (struct timeval *__restrict __tv,
[67] Fix | Delete
__timezone_ptr_t __tz) __THROW __nonnull ((1));
[68] Fix | Delete
[69] Fix | Delete
#ifdef __USE_MISC
[70] Fix | Delete
/* Set the current time of day and timezone information.
[71] Fix | Delete
This call is restricted to the super-user. */
[72] Fix | Delete
extern int settimeofday (const struct timeval *__tv,
[73] Fix | Delete
const struct timezone *__tz)
[74] Fix | Delete
__THROW;
[75] Fix | Delete
[76] Fix | Delete
/* Adjust the current time of day by the amount in DELTA.
[77] Fix | Delete
If OLDDELTA is not NULL, it is filled in with the amount
[78] Fix | Delete
of time adjustment remaining to be done from the last `adjtime' call.
[79] Fix | Delete
This call is restricted to the super-user. */
[80] Fix | Delete
extern int adjtime (const struct timeval *__delta,
[81] Fix | Delete
struct timeval *__olddelta) __THROW;
[82] Fix | Delete
#endif
[83] Fix | Delete
[84] Fix | Delete
[85] Fix | Delete
/* Values for the first argument to `getitimer' and `setitimer'. */
[86] Fix | Delete
enum __itimer_which
[87] Fix | Delete
{
[88] Fix | Delete
/* Timers run in real time. */
[89] Fix | Delete
ITIMER_REAL = 0,
[90] Fix | Delete
#define ITIMER_REAL ITIMER_REAL
[91] Fix | Delete
/* Timers run only when the process is executing. */
[92] Fix | Delete
ITIMER_VIRTUAL = 1,
[93] Fix | Delete
#define ITIMER_VIRTUAL ITIMER_VIRTUAL
[94] Fix | Delete
/* Timers run when the process is executing and when
[95] Fix | Delete
the system is executing on behalf of the process. */
[96] Fix | Delete
ITIMER_PROF = 2
[97] Fix | Delete
#define ITIMER_PROF ITIMER_PROF
[98] Fix | Delete
};
[99] Fix | Delete
[100] Fix | Delete
/* Type of the second argument to `getitimer' and
[101] Fix | Delete
the second and third arguments `setitimer'. */
[102] Fix | Delete
struct itimerval
[103] Fix | Delete
{
[104] Fix | Delete
/* Value to put into `it_value' when the timer expires. */
[105] Fix | Delete
struct timeval it_interval;
[106] Fix | Delete
/* Time to the next timer expiration. */
[107] Fix | Delete
struct timeval it_value;
[108] Fix | Delete
};
[109] Fix | Delete
[110] Fix | Delete
#if defined __USE_GNU && !defined __cplusplus
[111] Fix | Delete
/* Use the nicer parameter type only in GNU mode and not for C++ since the
[112] Fix | Delete
strict C++ rules prevent the automatic promotion. */
[113] Fix | Delete
typedef enum __itimer_which __itimer_which_t;
[114] Fix | Delete
#else
[115] Fix | Delete
typedef int __itimer_which_t;
[116] Fix | Delete
#endif
[117] Fix | Delete
[118] Fix | Delete
/* Set *VALUE to the current setting of timer WHICH.
[119] Fix | Delete
Return 0 on success, -1 on errors. */
[120] Fix | Delete
extern int getitimer (__itimer_which_t __which,
[121] Fix | Delete
struct itimerval *__value) __THROW;
[122] Fix | Delete
[123] Fix | Delete
/* Set the timer WHICH to *NEW. If OLD is not NULL,
[124] Fix | Delete
set *OLD to the old value of timer WHICH.
[125] Fix | Delete
Returns 0 on success, -1 on errors. */
[126] Fix | Delete
extern int setitimer (__itimer_which_t __which,
[127] Fix | Delete
const struct itimerval *__restrict __new,
[128] Fix | Delete
struct itimerval *__restrict __old) __THROW;
[129] Fix | Delete
[130] Fix | Delete
/* Change the access time of FILE to TVP[0] and the modification time of
[131] Fix | Delete
FILE to TVP[1]. If TVP is a null pointer, use the current time instead.
[132] Fix | Delete
Returns 0 on success, -1 on errors. */
[133] Fix | Delete
extern int utimes (const char *__file, const struct timeval __tvp[2])
[134] Fix | Delete
__THROW __nonnull ((1));
[135] Fix | Delete
[136] Fix | Delete
#ifdef __USE_MISC
[137] Fix | Delete
/* Same as `utimes', but does not follow symbolic links. */
[138] Fix | Delete
extern int lutimes (const char *__file, const struct timeval __tvp[2])
[139] Fix | Delete
__THROW __nonnull ((1));
[140] Fix | Delete
[141] Fix | Delete
/* Same as `utimes', but takes an open file descriptor instead of a name. */
[142] Fix | Delete
extern int futimes (int __fd, const struct timeval __tvp[2]) __THROW;
[143] Fix | Delete
#endif
[144] Fix | Delete
[145] Fix | Delete
#ifdef __USE_GNU
[146] Fix | Delete
/* Change the access time of FILE relative to FD to TVP[0] and the
[147] Fix | Delete
modification time of FILE to TVP[1]. If TVP is a null pointer, use
[148] Fix | Delete
the current time instead. Returns 0 on success, -1 on errors. */
[149] Fix | Delete
extern int futimesat (int __fd, const char *__file,
[150] Fix | Delete
const struct timeval __tvp[2]) __THROW;
[151] Fix | Delete
#endif
[152] Fix | Delete
[153] Fix | Delete
[154] Fix | Delete
#ifdef __USE_MISC
[155] Fix | Delete
/* Convenience macros for operations on timevals.
[156] Fix | Delete
NOTE: `timercmp' does not work for >= or <=. */
[157] Fix | Delete
# define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
[158] Fix | Delete
# define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
[159] Fix | Delete
# define timercmp(a, b, CMP) \
[160] Fix | Delete
(((a)->tv_sec == (b)->tv_sec) ? \
[161] Fix | Delete
((a)->tv_usec CMP (b)->tv_usec) : \
[162] Fix | Delete
((a)->tv_sec CMP (b)->tv_sec))
[163] Fix | Delete
# define timeradd(a, b, result) \
[164] Fix | Delete
do { \
[165] Fix | Delete
(result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
[166] Fix | Delete
(result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \
[167] Fix | Delete
if ((result)->tv_usec >= 1000000) \
[168] Fix | Delete
{ \
[169] Fix | Delete
++(result)->tv_sec; \
[170] Fix | Delete
(result)->tv_usec -= 1000000; \
[171] Fix | Delete
} \
[172] Fix | Delete
} while (0)
[173] Fix | Delete
# define timersub(a, b, result) \
[174] Fix | Delete
do { \
[175] Fix | Delete
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
[176] Fix | Delete
(result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
[177] Fix | Delete
if ((result)->tv_usec < 0) { \
[178] Fix | Delete
--(result)->tv_sec; \
[179] Fix | Delete
(result)->tv_usec += 1000000; \
[180] Fix | Delete
} \
[181] Fix | Delete
} while (0)
[182] Fix | Delete
#endif /* Misc. */
[183] Fix | Delete
[184] Fix | Delete
__END_DECLS
[185] Fix | Delete
[186] Fix | Delete
#endif /* sys/time.h */
[187] Fix | Delete
[188] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function