summaryrefslogtreecommitdiffstats
path: root/include/time.h
Commit message (Collapse)AuthorAgeFilesLines
* Add POSIX pthread API pthread_getcpuclockid() to get a thread's cpudavidxu2008-03-221-0/+1
| | | | time clock id.
* Copy the new CLOCK_ defines from sys/time.h for SUSv3 compatibility.jb2006-04-151-0/+8
| | | | Approved by: rwatson
* Add POSIX timer interfaces.davidxu2005-10-301-1/+9
|
* Define CLOCK_* and TIMER_* in time.h, where they are supposed to be.das2005-04-021-1/+20
|
* Change the definition of NULL on ia64 (for LP64 compilations) frommarcel2003-12-071-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | an int constant to a long constant. This change improves consistency in the following two ways: 1. The first 8 arguments are always passed in registers on ia64, which by virtue of the generated code implicitly widens ints to longs and allows the use of an 32-bit integral type for 64-bit arguments. Subsequent arguments are passed onto the memory stack, which does not exhibit the same behaviour and consequently do not allow this. In practice this means that variadic functions taking pointers and given NULL (without cast) work as long as the NULL is passed in one of the first 8 arguments. A SIGSEGV is more likely the result if such would be done for stack-based arguments. This is due to the fact that the upper 4 bytes remain undefined. 2. All 64-bit platforms that FreeBSD supports, with the obvious exception of ia64, allow 32-bit integral types (specifically NULL) when 64-bit pointers are expected in variadic functions by way of how the compiler generates code. As such, code that works correctly (whether rightfully so or not) on any platform other than ia64, may fail on ia64. To more easily allow tweaking of the definition of NULL, this commit removes the 12 definitions in the various headers and puts it in a new header that can be included whenever NULL is to be made visible. This commit fixes GNOME, emacs, xemacs and a whole bunch of ports that I don't particularly care about at this time...
* Style: One space between "restrict" qualifier and "*".tjr2002-09-061-4/+4
|
* Now that _BSD_CLK_TCK_ and _BSD_CLOCKS_PER_SEC_ are the same on allmike2002-09-031-4/+2
| | | | | architectures, move the definition directly into <time.h> and finish the removal of <machine/ansi.h>.
* o Merge <machine/ansi.h> and <machine/types.h> into a new headermike2002-08-211-15/+17
| | | | | | | | | | | | | | | | | | | | | called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien
* - Add the 'restrict' qualifier to the function definition ofrobert2002-08-141-1/+2
| | | | | | | | | strftime(3) for IEEE Std 1003.1-2001 compliance and remove excessive usage of the 'const' qualifier that was neither present in the prototype in the publice header, nor in the local prototype just above the function definition. - Replace the K&R function definition with a ANSI-C one. - Update the prototype of strftime(3) in its manual page.
* - Add the C99 'restrict' qualifier using the '__restrict' macro torobert2002-08-141-1/+2
| | | | | function prototype and definition of strptime(3). - Update the manual page.
* The thread-safe time functions appear to have been introduced as ofwollman2002-06-271-6/+7
| | | | | ISO 9945-1: 1996 (according to the change bars therein), which corresponds to 1003.1c-1995. Give them appropriate visibility protection.
* Resort namespace blocks into a more sensible order. Delete a redundantwollman2002-06-271-8/+7
| | | | comment.
* Move dillon's time conversion functions to a new header <timeconv.h>.wollman2002-06-171-11/+0
| | | | | | Since they were never documented and have never appeared in a FreeBSD release, no repo-copy of the header is done. This removes namespace pollution from <time.h>.
* Clean up a bit of namespace pollution which crept in with the last rev.wollman2002-06-171-1/+1
| | | | Submitted by: bde
* Partially fix namespace visibility issues by using new visibility macros.wollman2002-06-151-25/+19
| | | | | Some issues still remain, and will require research in old POSIX standards if we care to get them right.
* Breath deep and take __P out of the system include files.imp2002-03-231-31/+31
| | | | | | # This appears to not break X11, but I'm having problems compiling the # glide part of the server with or without this patch, so I can't tell # for sure.
* I've been meaning to do this for a while. Add an underscore to thedillon2002-01-191-8/+8
| | | | | | | | time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx() instead of time_to_xxx(), to make it more obvious that these are stopgap functions & placemarkers and not meant to create a defacto standard. They will eventually be replaced when a real standard comes out of committee.
* Add time_to_int(), int_to_time(), time_to_long(), long_to_time().dillon2001-10-281-0/+4
|
* Add routines to convert time_t to/from fixed-bit fields. These routinesdillon2001-10-281-0/+7
| | | | | | | | | | | | | | | | | | | serve two purposes: (1) so we can maintain backwards compatibility with protocols (rwhod, dump, etc...) that either assume time_t is 32 bits or assume sizeof(time_t) == sizeof(int), or make other similar assumptions. (2) To tag such routines (by the presence of these calls) for future cleanup/extension work. The 32->64 routine, time32_to_time() (when time_t is 64 bits, that is), is defined specifically to implement temporal locality to properly set the msb bits of a 64 bit time_t quantity, using the 50 year rule. The locality code has not been implemented yet (and doesn't need to be for a while), but that is the intent. This will allow us to maintain backwards protocol compatibility past 2038. These routines are intended to be platform and time_t agnostic. MFC after: 1 week
* It's not CUT (the french would accept that back in 1879) and TUC wasn'tphk2001-03-311-1/+5
| | | | | | | palatable to the rest of the world. UTC was the compromise. PR: 26238 Submitted by: Ying-Chieh Liao <ijliao@terry.dragon2.net>
* Make ctime_r, asctime_r, gmtime_r, and localtime_r available in libc.dt1999-01-041-7/+4
|
* Change return type of strptime from const char* to char*.dt1998-09-121-1/+1
| | | | const char* was wrong and nonstandard.
* Add extern declaration for `tzname[]' to make this header comply betterjkoshy1998-08-211-0/+4
| | | | | | to POSIX90. 2-rounds-of-review-by: bde
* ctime_r and asctime_r are not implemented.phk1998-04-191-2/+2
| | | | | | | | prototypes in time.h do not match POSIX. PR: 6345 Reviewed by: phk Submitted by: Dmitry Khrustalev <dima@xyzzy.machaon.ru>
* Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B anddufault1998-03-281-1/+7
| | | | | | | | | | | | | | | | _KPOSIX_PRIORITY_SCHEDULING options to work. Changes: Change all "posix4" to "p1003_1b". Misnamed files are left as "posix4" until I'm told if I can simply delete them and add new ones; Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux; Add man pages for _POSIX_PRIORITY_SCHEDULING system calls; Add options to LINT; Minor fixes to P1003_1B code during testing.
* Import strptime(3) into libc. We've got permission by Kevin Ruddy tojoerg1997-08-091-0/+1
| | | | | | | | modify the original `no modifications' copyright message, and i've included his mail into the source file. The common localization functions between strptime(3) and strftime(3) have been broken out into timelocal.[ch].
* struct timespec needs to be useable with just <time.h>, but needs to notpeter1997-05-131-7/+27
| | | | | | conflict with the kernel visible one. Make the new stuff not visible if _ANSI_SOURCE or _POSIX_SOURCE is defined (!) because the new things are not part of the base 1003.1-1990 standard (or ansi).
* Add clockid_t definition like in sys/types.h to allow time.hache1997-05-131-0/+5
| | | | to be included without sys/types.h, it fixes broken groff compilation
* Oops, move clock_*() and nanosleep() to time.hpeter1997-05-121-0/+4
| | | | Submitted by: Peter Dufault <dufault@hda.com>
* Change prototypes for gmtime_r() and localtime_r() in accordance withhsu1996-11-111-3/+3
| | | | IEEE pthreads specification.
* Reviewed by: julian and (hsu?)julian1996-01-221-0/+7
| | | | | | Submitted by: John Birrel(L?) changes for threadsafe operations
* Define CLK_TCK right.bde1995-02-081-1/+1
|
* Define CLOCKS_PER_SEC.bde1995-02-031-2/+11
| | | | | | | | Define CLK_TCK only if _ANSI_SOURCE is not defined. Don't include <machine/limits.h> to get the definition of CLK_TCK. CLK_TCK should never have been defined there, and the inclusion polluted the namespace.
* Declare useful functions (timelocal() and timegm())ache1994-12-261-0/+2
|
* BSD 4.4 Lite Include Sourcesrgrimes1994-05-241-0/+104
OpenPOWER on IntegriCloud