/breezy/3.0

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/3.0

« back to all changes in this revision

Viewing changes to breezy/osutils.py

  • Committer: Breezy landing bot
  • Author(s): Vincent Ladeuil
  • Date: 2019-03-06 11:29:23 UTC
  • mfrom: (7304.1.2 3.0)
  • Revision ID: breezy.the.bot@gmail.com-20190306112923-4j11qd9eo5kk8h8i
Release 3.0.0

Merged from https://code.launchpad.net/~vila/brz/3.0.0/+merge/364029

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
    )
71
71
 
72
72
 
73
 
# Cross platform wall-clock time functionality with decent resolution.
74
 
# On Linux ``time.clock`` returns only CPU time. On Windows, ``time.time()``
75
 
# only has a resolution of ~15ms. Note that ``time.clock()`` is not
76
 
# synchronized with ``time.time()``, this is only meant to be used to find
77
 
# delta times by subtracting from another call to this function.
78
 
timer_func = time.time
79
 
if sys.platform == 'win32':
80
 
    timer_func = time.clock
81
 
 
82
73
# On win32, O_BINARY is used to indicate the file should
83
74
# be opened in binary mode, rather than text mode.
84
75
# On other platforms, O_BINARY doesn't exist, because
2609
2600
    if sys.platform == "win32" and win32utils._is_pywintypes_error(evalue):
2610
2601
        return True
2611
2602
    return False
 
2603
 
 
2604
 
 
2605
if PY3:
 
2606
    perf_counter = time.perf_counter
 
2607
else:
 
2608
    perf_counter = time.clock