VirtualBox

Changeset 82966 in vbox for trunk


Ignore:
Timestamp:
Feb 4, 2020 10:09:09 AM (5 years ago)
Author:
vboxsync
Message:

ValKit: time.clock was dropped in 3.8, so stop using it.

Location:
trunk/src/VBox/ValidationKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/common/utils.py

    r82640 r82966  
    13381338# Note! We cannot use time.clock() as the timestamp must be portable across
    13391339#       processes.  See timeout testcase problem on win hosts (no logs).
     1340#       Also, time.clock() was axed in python 3.8 (https://bugs.python.org/issue31803).
    13401341#
    13411342#import sys;
  • trunk/src/VBox/ValidationKit/testdriver/base.py

    r80237 r82966  
    155155    Gets a millisecond timestamp.
    156156    """
    157     if sys.platform == 'win32':
    158         return long(time.clock() * 1000);
    159     return long(time.time() * 1000);
     157    return utils.timestampMilli();
    160158
    161159def timestampNano():
     
    163161    Gets a nanosecond timestamp.
    164162    """
    165     if sys.platform == 'win32':
    166         return long(time.clock() * 1000000000);
    167     return long(time.time() * 1000000000);
     163    return utils.timestampNano();
    168164
    169165def tryGetHostByName(sName):
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette