cpython/Python
Victor Stinner cb29f0177c Issue #22117: Add a new Python timestamp format _PyTime_t to pytime.h
In practice, _PyTime_t is a number of nanoseconds. Its C type is a 64-bit
signed number. It's integer value is in the range [-2^63; 2^63-1]. In seconds,
the range is around [-292 years; +292 years]. In term of Epoch timestamp
(1970-01-01), it can store a date between 1677-09-21 and 2262-04-11.

The API has a resolution of 1 nanosecond and use integer number. With a
resolution on 1 nanosecond, 64-bit IEEE 754 floating point numbers loose
precision after 194 days. It's not the case with this API. The drawback is
overflow for values outside [-2^63; 2^63-1], but these values are unlikely for
most Python modules, except of the datetime module.

New functions:

- _PyTime_GetMonotonicClock()
- _PyTime_FromObject()
- _PyTime_AsMilliseconds()
- _PyTime_AsTimeval()

This change uses these new functions in time.sleep() to avoid rounding issues.

The new API will be extended step by step, and the old API will be removed step
by step. Currently, some code is duplicated just to be able to move
incrementally, instead of pushing a large change at once.
2015-03-27 13:31:18 +01:00
..
clinic Move import.c to use Clinic file output. 2014-05-30 11:21:14 -04:00
_warnings.c Issue #4180: The warnings registries are now reset when the filters are modified. 2014-09-18 02:42:05 +02:00
asdl.c Issue #22207: Fix "comparison between signed and unsigned integers" warning in 2014-08-17 22:20:00 +02:00
ast.c Initialize variables to prevent GCC warnings 2015-03-18 15:02:06 +01:00
bltinmodule.c Initialize variables to prevent GCC warnings 2015-03-18 15:02:06 +01:00
ceval.c Issue #23571: _Py_CheckFunctionResult() now gives the name of the function 2015-03-21 15:04:43 +01:00
ceval_gil.h Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
codecs.c Issue #23450: Fixed possible integer overflows. 2015-02-16 20:52:17 +02:00
compile.c Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet. 2015-03-11 18:22:29 +02:00
condvar.h Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
dtoa.c Fix compiler warning in dtoa.c 2015-03-18 15:01:44 +01:00
dup2.c
dynamic_annotations.c
dynload_aix.c Issue #18722: Remove uses of the "register" keyword in C code. 2013-08-13 20:18:52 +02:00
dynload_dl.c Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. 2012-05-04 15:20:40 -04:00
dynload_hpux.c Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. 2012-05-04 15:20:40 -04:00
dynload_next.c Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. 2012-05-04 15:20:40 -04:00
dynload_shlib.c Issue #23152: Implement _Py_fstat() to support files larger than 2 GB on Windows. 2015-02-21 08:44:05 -08:00
dynload_stub.c Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. 2012-05-04 15:20:40 -04:00
dynload_win.c #22980 Adds platform and version tags to .pyd files 2014-12-15 20:45:23 -08:00
errors.c Issue #23571: PyErr_FormatV() and PyErr_SetObject() now always clear the 2015-03-24 12:41:23 +01:00
fileutils.c Issue #23753: Move _Py_wstat() from Python/fileutils.c to Modules/getpath.c 2015-03-24 12:16:28 +01:00
formatter_unicode.c Close issue #8931: Make alternate formatting for 'c' raise an exception. Patch by Torsten Landschoff. 2014-04-15 22:37:55 -04:00
frozen.c make some freezing related stuff const 2013-03-13 14:06:39 -05:00
frozenmain.c merge 3.4 (#22633) 2015-02-14 15:17:47 -05:00
future.c Close #11619: The parser and the import machinery do not encode Unicode 2013-08-26 22:28:21 +02:00
getargs.c Issue #22581: Use more "bytes-like object" throughout the docs and comments. 2014-12-05 22:26:10 +02:00
getcompiler.c
getcopyright.c merge 3.2 2014-12-31 18:10:13 -06:00
getopt.c #16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka. 2012-11-23 18:48:32 +02:00
getplatform.c
getversion.c
graminit.c PEP 465: a dedicated infix operator for matrix multiplication (closes #21176) 2014-04-09 23:55:56 -04:00
import.c Issue #23694: Enhance _Py_fopen(), it now raises an exception on error 2015-03-18 01:39:23 +01:00
importdl.c Issue #18408: Fix _PyImport_LoadDynamicModule(), handle PyUnicode_FromFormat() failure 2013-07-17 21:53:23 +02:00
importdl.h #16135: Removal of OS/2 support (I) 2012-10-05 01:04:27 +02:00
importlib.h merge 3.4 (#21295) 2015-02-02 10:52:56 -05:00
makeopcodetargets.py excise the remains of STOP_CODE, which hasn't done anything useful for years 2011-07-17 22:49:50 -05:00
marshal.c Issue #23753: Python doesn't support anymore platforms without stat() or 2015-03-24 10:27:50 +01:00
modsupport.c Issue #20024: Py_BuildValue() now saves/restores the current exception before 2014-01-21 20:52:17 +01:00
mysnprintf.c
mystrtoul.c Issue #1772673: The type of char* arguments now changed to const char*. 2013-10-19 21:03:34 +03:00
opcode_targets.h PEP 465: a dedicated infix operator for matrix multiplication (closes #21176) 2014-04-09 23:55:56 -04:00
peephole.c Issue #23450: Silenced compiler warnings and added asserts in peephole optimizer. 2015-02-16 21:13:24 +02:00
pyarena.c Issue #18203: Replace malloc() with PyMem_Malloc() to allocate arena objects 2013-07-07 17:18:53 +02:00
pyctype.c
pyfpe.c Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
pyhash.c Issue #20162: Fix an alignment issue in the siphash24() hash function which 2014-02-01 03:38:56 +01:00
pylifecycle.c (Merge 3.4) Issue #23571: Fix reentrant call to Py_FatalError() 2015-03-25 01:55:14 +01:00
pymath.c
pystate.c Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
pystrcmp.c
pystrtod.c Removed duplicated words in in comments and docs. 2014-12-01 18:28:43 +02:00
Python-ast.c PEP 465: a dedicated infix operator for matrix multiplication (closes #21176) 2014-04-09 23:55:56 -04:00
pythonrun.c Issue #23571: Fix reentrant call to Py_FatalError() 2015-03-25 01:54:46 +01:00
pytime.c Issue #22117: Add a new Python timestamp format _PyTime_t to pytime.h 2015-03-27 13:31:18 +01:00
random.c Issue #23707: On UNIX, os.urandom() now calls the Python signal handler when 2015-03-19 23:36:33 +01:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
sigcheck.c
strdup.c Issue #18722: Remove uses of the "register" keyword in C code. 2013-08-13 20:18:52 +02:00
structmember.c Fix null pointer dereferencing in structmember.c PyMember_SetOne() for T_CHAR. _PyUnicode_AsStringAndSize() can return NULL without touching the len argument. Also remove unnecessary PyUnicode_Check(), _PyUnicode_AsStringAndSize() performance the test again. CID 486815 2012-09-11 17:30:53 +02:00
symtable.c merge 3.3 (#19098) 2013-09-26 22:21:41 -04:00
sysmodule.c Issue #23451: Update pyconfig.h for Windows to require Vista headers and remove unnecessary version checks. 2015-03-02 08:01:10 -08:00
thread.c Removed duplicated words in in comments and docs. 2014-12-01 18:30:14 +02:00
thread_foobar.h Issue #21312: Update the thread_foobar.h template file to include newer threading APIs. Patch by Jack McCracken. 2014-04-28 21:12:11 +02:00
thread_nt.h Merging from 3.3: The PyCOND_TIMEDWAIT must use microseconds for the timeout argument 2014-05-08 10:59:52 +00:00
thread_pthread.h Issue #22206: Using pthread, PyThread_create_key() now sets errno to ENOMEM and 2014-08-17 22:11:06 +02:00
traceback.c Merge 3.4 (traceback) 2015-03-25 02:30:01 +01:00

Miscellaneous source files for the main Python shared library