cpython/Include
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
..
abstract.h Issue #23571: _Py_CheckFunctionResult() now gives the name of the function 2015-03-21 15:04:43 +01:00
accu.h
asdl.h Fix compiler warning on Windows 64-bit: asdl_seq_SET() stores the index parameter 2013-11-16 00:16:58 +01:00
ast.h Close #11619: The parser and the import machinery do not encode Unicode 2013-08-26 22:28:21 +02:00
bitset.h
bltinmodule.h
boolobject.h
bytearrayobject.h fix comment 2013-10-05 16:28:04 -04:00
bytes_methods.h Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer() 2015-02-03 01:25:42 +02:00
bytesobject.h Issue20284: Implement PEP461 2015-01-23 20:05:18 -08:00
cellobject.h
ceval.h
classobject.h
code.h #11983: update comment to describe which fields are used and why. 2014-04-14 14:19:52 -04:00
codecs.h Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
compile.h Issue #19722: Added opcode.stack_effect(), which accurately 2013-11-23 14:49:22 -08:00
complexobject.h Issue #21803: remove macro indirections in complexobject.h 2014-07-07 18:49:30 -04:00
datetime.h #18466: fix more typos. Patch by Févry Thibault. 2013-08-17 16:57:41 +03:00
descrobject.h
dictobject.h do not expose known hash api in stable API 2014-05-03 19:39:15 -04:00
dtoa.h
dynamic_annotations.h fix instances of consecutive articles (closes #23221) 2015-01-13 09:17:24 -05:00
enumobject.h
errcode.h
eval.h
fileobject.h Issue #23524: Replace _PyVerify_fd function with calling _set_thread_local_invalid_parameter_handler on every thread. 2015-03-06 14:47:02 -08:00
fileutils.h Issue #23753: Move _Py_wstat() from Python/fileutils.c to Modules/getpath.c 2015-03-24 12:16:28 +01:00
floatobject.h
frameobject.h Issue #14432: Remove the thread state field from the frame structure. Fix a 2013-12-13 02:01:38 +01:00
funcobject.h
genobject.h Issue #21205: Add a new `__qualname__` attribute to generator, the qualified 2014-06-16 15:59:28 +02:00
graminit.h
grammar.h Removed trailing tabs. 2015-03-21 09:25:53 +02:00
import.h (Merge 3.3) Issue #19932: Fix typo in import.h, missing whitespaces in function prototypes. 2013-12-10 01:20:39 +01:00
intrcheck.h
iterobject.h
listobject.h remove tab (closes #21587) 2014-05-26 15:12:28 -07:00
longintrepr.h Issue #18783: Removed existing mentions of Python long type in docstrings, 2013-08-27 19:40:23 +03:00
longobject.h Issue #17576: Deprecation warning emitted now when __int__() or __index__() 2013-12-11 21:26:36 +02:00
marshal.h Issue #1772673: The type of char* arguments now changed to const char*. 2013-10-19 21:03:34 +03:00
memoryobject.h Closes #22668: Merge from 3.4. 2015-01-29 14:29:51 +01:00
metagrammar.h
methodobject.h Issue #22116: C functions and methods (of the 'builtin_function_or_method' type) can now be weakref'ed. Patch by Wei Wu. 2014-08-06 19:31:40 -04:00
modsupport.h Issue #20294: Argument Clinic now supports argument parsing for __new__ and 2014-01-18 23:50:21 -08:00
moduleobject.h Issue #19255: The builtins module is restored to initial value before 2014-02-10 18:21:34 +02:00
namespaceobject.h
node.h Removed trailing tabs. 2015-03-21 09:25:53 +02:00
object.h Issue #22869: Split pythonrun into two modules 2014-11-20 21:39:37 +10:00
objimpl.h Issue #21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(), 2014-05-02 22:31:14 +02:00
opcode.h Closes Issue 17861: Autogenerate Include/opcode.h from opcode.py. 2014-04-15 23:50:06 +05:30
osdefs.h Issue #22591: Drop support of MS-DOS 2014-10-10 11:55:41 +02:00
parsetok.h Issue #1772673: The type of char* arguments now changed to const char*. 2013-10-19 21:03:34 +03:00
patchlevel.h Post-release changes for 3.5.0a2. 2015-03-09 02:39:47 -07:00
pgen.h
pgenheaders.h
py_curses.h
pyarena.h
pyatomic.h Issue #23644: Fix issues with C++ when compiling Python extensions 2015-03-17 22:53:27 +01:00
pycapsule.h
pyctype.h
pydebug.h Issue #22869: Split pythonrun into two modules 2014-11-20 21:39:37 +10:00
pyerrors.h Issue #22869: Split pythonrun into two modules 2014-11-20 21:39:37 +10:00
pyexpat.h Issue #13612: handle unknown encodings without a buffer overflow. 2013-05-25 05:25:48 -07:00
pyfpe.h
pygetopt.h
pyhash.h Issue #19526: Exclude all new API from the stable ABI. 2014-01-03 21:36:49 +01:00
pylifecycle.h Issue #22869: Split pythonrun into two modules 2014-11-20 21:39:37 +10:00
pymacconfig.h
pymacro.h Issue #21490: Add new C macros: Py_ABS() and Py_STRINGIFY() 2014-05-14 17:24:35 +02:00
pymath.h
pymem.h Issue #21233: Rename the C structure "PyMemAllocator" to "PyMemAllocatorEx" to 2014-06-02 21:57:10 +02:00
pyport.h Issue #23753: Python doesn't support anymore platforms without stat() or 2015-03-24 10:27:50 +01:00
pystate.h Issue #23644: Fix issues with C++ when compiling Python extensions 2015-03-17 22:53:27 +01:00
pystrcmp.h
pystrtod.h
Python-ast.h PEP 465: a dedicated infix operator for matrix multiplication (closes #21176) 2014-04-09 23:55:56 -04:00
Python.h Issue #22869: Split pythonrun into two modules 2014-11-20 21:39:37 +10:00
pythonrun.h Issue #22869: Split pythonrun into two modules 2014-11-20 21:39:37 +10:00
pythread.h
pytime.h Issue #22117: Add a new Python timestamp format _PyTime_t to pytime.h 2015-03-27 13:31:18 +01:00
rangeobject.h
setobject.h Move the set search finger before the smalltable. 2015-01-29 22:00:32 -08:00
sliceobject.h Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
structmember.h
structseq.h Issue #18520: Add a new PyStructSequence_InitType2() function, same than 2013-07-22 22:24:54 +02:00
symtable.h Close #11619: The parser and the import machinery do not encode Unicode 2013-08-26 22:28:21 +02:00
sysmodule.h Issue #22193: Fixed integer overflow error in sys.getsizeof(). 2014-11-15 13:21:37 +02:00
token.h PEP 465: a dedicated infix operator for matrix multiplication (closes #21176) 2014-04-09 23:55:56 -04:00
traceback.h Issue #22462: Fix pyexpat's creation of a dummy frame to make it appear in exception tracebacks. 2014-10-08 20:00:09 +02:00
tupleobject.h
typeslots.h PEP 465: a dedicated infix operator for matrix multiplication (closes #21176) 2014-04-09 23:55:56 -04:00
ucnhash.h Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
unicodeobject.h Merge 3.4 (typo) 2015-02-11 18:18:10 +01:00
warnings.h Issue #19526: Exclude all new API from the stable ABI. 2014-01-03 21:36:49 +01:00
weakrefobject.h Closes #13867: remove untrue comment about PyWeakref_Check(). 2013-10-08 19:50:26 +02:00