Commit Graph

13 Commits

Author SHA1 Message Date
Victor Stinner 2b89fdf7eb PEP 418: Rename adjusted attribute to adjustable in time.get_clock_info() result
Fix also its value on Windows and Linux according to its documentation:
"adjustable" indicates if the clock *can be* adjusted, not if it is or was
adjusted.

In most cases, it is not possible to indicate if a clock is or was adjusted.
2012-06-12 22:46:37 +02:00
Larry Hastings 76ad59b7e8 Issue #14127: Add ns= parameter to utime, futimes, and lutimes.
Removed futimens as it is now redundant.
Changed shutil.copystat to use st_atime_ns and st_mtime_ns from os.stat
and ns= parameter to utime--it once again preserves exact metadata on Linux!
2012-05-03 00:30:07 -07:00
Benjamin Peterson 49a69e4d48 strip is_ prefixes on clock_info fields 2012-05-01 09:38:34 -04:00
Victor Stinner ec89539ccc Issue #14428, #14397: Implement the PEP 418
* Rename time.steady() to time.monotonic()
 * On Windows, time.monotonic() uses GetTickCount/GetTickCount64() instead of
   QueryPerformanceCounter()
 * time.monotonic() uses CLOCK_HIGHRES if available
 * Add time.get_clock_info(), time.perf_counter() and time.process_time()
   functions
2012-04-29 02:41:27 +02:00
Larry Hastings 6fe20b3aee Issue #14127: Add st_{cma}time_ns fields to os.stat() result object. 2012-04-19 15:07:49 -07:00
Victor Stinner 5d272cc6a2 Close #14180: Factorize code to convert a number of seconds to time_t, timeval or timespec
time.ctime(), gmtime(), time.localtime(), datetime.date.fromtimestamp(),
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
raises an OverflowError, instead of a ValueError, if the timestamp does not fit
in time_t.

datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
round microseconds towards zero instead of rounding to nearest with ties going
away from zero.
2012-03-13 13:35:55 +01:00
Victor Stinner 643cd68ea4 Issue #13964: signal.sigtimedwait() timeout is now a float instead of a tuple
Add a private API to convert an int or float to a C timespec structure.
2012-03-02 22:54:03 +01:00
Victor Stinner 4195b5caea Backout f8409b3d6449: the PEP 410 is not accepted yet 2012-02-08 23:03:19 +01:00
Victor Stinner ccd5715a14 PEP 410 2012-02-08 14:31:50 +01:00
Martin v. Löwis 4d0d471a80 Merge branches/pep-0384. 2010-12-03 20:14:31 +00:00
Antoine Pitrou 3e1fd27b74 Issue #9090: When a socket with a timeout fails with EWOULDBLOCK or EAGAIN,
retry the select() loop instead of bailing out.  This is because select()
can incorrectly report a socket as ready for reading (for example, if it
received some data with an invalid checksum).
2010-09-28 21:23:11 +00:00
Antoine Pitrou e81c806be7 De-duplicate contents of pytime.h 2010-08-13 15:25:56 +00:00
Alexander Belopolsky 6fc4ade2bb Issue #9079: Added _PyTime_gettimeofday(_PyTime_timeval *tp) to C API
exposed in Python.h.  This function is similar to POSIX
gettimeofday(struct timeval *tp), but available on platforms without
gettimeofday().
2010-08-05 17:34:27 +00:00