Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Oct 17, 2017

  • Remove time.clock() function
  • time.get_clock_info() doesn't accept 'clock' anymore
  • Document the removal in What's New in Python 3.7
  • Replace time.clock() with time.perf_counter() in the profile
    module, in turtledemo, and in ctypes tests.

https://bugs.python.org/issue31803

* Remove time.clock() function
* time.get_clock_info() doesn't accept 'clock' anymore
* Document the removal in What's New in Python 3.7
* Replace time.clock() with time.perf_counter() in the profile
  module, in turtledemo, and in ctypes tests.
This option wasn't implemented, documented, nor tested.

.. versionadded:: 3.3
.. versionchanged:: 3.7
``'clock'`` is no more accepted since ``time.clock()`` was removed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/no more/no longer

----

The ``time.clock()`` function has been removed, it was deprecated since Python
3.3. The function was not portable: on Windows it mesured wall-clock, whereas
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps replace:

it was deprecated since Python 3.3.

with:

as it has been deprecated since Python 3.3.

----

The ``time.clock()`` function has been removed, it was deprecated since Python
3.3. The function was not portable: on Windows it mesured wall-clock, whereas
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/mesured/measured

The ``time.clock()`` function has been removed, it was deprecated since Python
3.3. The function was not portable: on Windows it mesured wall-clock, whereas
it measured CPU time on Unix. Python provides better defined clocks with better
resolution since Python 3.3: use :func:`time.perf_counter` or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps change:

Python provides better defined clocks with better resolution since Python 3.3

to:

Python has provided other clocks with better resolution since Python 3.3

@vstinner
Copy link
Member Author

I merged my PR #4020 which emits a deprecation warning. Let's wait for Pyhon 3.8 to remove time.clock(). I abandon this PR.

@vstinner vstinner closed this Oct 17, 2017
@vstinner vstinner deleted the time_clock branch October 17, 2017 21:47
@vstinner
Copy link
Member Author

Thanks for the review @dianaclarke anyway ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants