From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.92.40.15]) by mx.groups.io with SMTP id smtpd.web10.3510.1588990996099161431 for ; Fri, 08 May 2020 19:23:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=oQ7G/JCS; spf=pass (domain: outlook.com, ip: 40.92.40.15, mailfrom: michael.kubacki@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XMAYFgB8w+XlAC5ivSgXl5dY7L5SjFf7+WsKu18jfdR38zRjrCMDKAGAscGu+nJQz7QvooWosrSDQcvwRWlgIhA510Dgbh57CvB7sc2mcxhvwdiAVJeCx6uszSwQkNb67itCHBYJG5VNz+b5wuMByZOBAHUykv/2Zyvz8m8JFJXQnkEwIaoYRRbZNEDIkKQxKTgKsoH/SHfoqZRdMXFtF8UIvFSBloc3ufD2bVrXzLZVlt6QGKsSu+/mQBRmMDvOgArbmk8WcHNGWHwSZjyTb6Na5yDAy23onyh08WND3CVG1kMCiPUXFta+pHwgAKsvhlm91fFDaIpEQ5c8wZDDPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AnDLaaYK1DmBnSP8Kbo6eFtzOWHx5FuwFXbL1gRvvfw=; b=XMn7w097Bv6g01+LS7scGd6YETv0bSfXihk4M0BDFpbW8uc4tMC58japoShZW8A0Ury7E0REsHeMziRbC0a134/oYl1ObXdwo6DVo+lSDtMpUQCYyyH3TzY2y8ulqkjP361mHjNogmp0PrMQix3/mrIg5gVaIlZ5u5VPJQEGY4UtOw+sfmXXcWgBdDkwfUToUpGRsyt2t1er3e2Cp0QqBesui/imyLqlgJitHxjDIZ1M63geHnn4UOuKNRYWpBbmPIHE+ydHanXgTbn1avip+IkldQpLvsaM8/IjtXFrZ0VP9BEGFBUkCpSqyK2t6x8YAztmnxnOBWhzHqy5FJZVqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=outlook.com; dmarc=pass action=none header.from=outlook.com; dkim=pass header.d=outlook.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AnDLaaYK1DmBnSP8Kbo6eFtzOWHx5FuwFXbL1gRvvfw=; b=oQ7G/JCSNWStwiW0v3jixeyi6aJD2PlRamPVCXOOIMAUlT+ckiSZg4GynRWQkgMHlQCpXfVwrjZ1QBL2dkfa8b9rMAYIyhdTf9lrsONW/6WZLTalqiRmeoyPIWD0+LMKQxqKJp1GhLTScs8tB1Q3gkrHv+5gT5tdtT2hNDvXZ5VUrE+aaRSizvEQDRHusIIBUyxTpsiGCA6rnnz6X5+kyFFqttgM2K1piG6Z3jFcI7ISI+yjgMFS8PJIi43X3e3SqLtZka3VI7jhhN0ry2RYFVt39c7rlL/IlL6EC+ya+sOITezjSx9H0zddAD1wZSC6HTaYaMBNCVXE1C+i+dv7pw== Received: from BN7NAM10FT041.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::40) by BN7NAM10HT066.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::318) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27; Sat, 9 May 2020 02:23:14 +0000 Received: from MWHPR07MB3440.namprd07.prod.outlook.com (2a01:111:e400:7e8f::4a) by BN7NAM10FT041.mail.protection.outlook.com (2a01:111:e400:7e8f::71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27 via Frontend Transport; Sat, 9 May 2020 02:23:14 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:07903BE64CD779461FAA3EF62EECD1B6A0071481D448C46D785D71BAD723F65A;UpperCasedChecksum:68FF6EC4F649A3C85B39DA2DB114F4F3238616584CA5C1B1AF617F4858E87943;SizeAsReceived:7604;Count:47 Received: from MWHPR07MB3440.namprd07.prod.outlook.com ([fe80::bcc9:271b:20db:52e3]) by MWHPR07MB3440.namprd07.prod.outlook.com ([fe80::bcc9:271b:20db:52e3%6]) with mapi id 15.20.2958.029; Sat, 9 May 2020 02:23:14 +0000 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao Subject: [PATCH v1 1/1] BaseTools/Ecc: Replace deprecated function time.clock() Date: Fri, 8 May 2020 19:22:42 -0700 Message-ID: X-Mailer: git-send-email 2.16.3.windows.1 X-ClientProxiedBy: MWHPR1701CA0009.namprd17.prod.outlook.com (2603:10b6:301:14::19) To MWHPR07MB3440.namprd07.prod.outlook.com (2603:10b6:301:69::28) Return-Path: michael.kubacki@outlook.com X-Microsoft-Original-Message-ID: <20200509022242.26824-1-michael.kubacki@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (2001:4898:80e8:f:d819:3f36:f76a:d27) by MWHPR1701CA0009.namprd17.prod.outlook.com (2603:10b6:301:14::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27 via Frontend Transport; Sat, 9 May 2020 02:23:14 +0000 X-Mailer: git-send-email 2.16.3.windows.1 X-Microsoft-Original-Message-ID: <20200509022242.26824-1-michael.kubacki@outlook.com> X-TMN: [Yj9Pc4iDcpMPOA01tltgTMbEnK6m8y1PjQoRTN7ogRWxivvGlfPYF1z2rWutAtgv] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 216c764e-dc5a-4493-5aa9-08d7f3bfed4a X-MS-TrafficTypeDiagnostic: BN7NAM10HT066: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pDEnSFXEDvTNpkK+pNaTjzouYs2OhAkYvBwSGiHnp3XqSd6LMnrzJsG/wsMq+MTPpzFyDxv5zBy4u7PiDgFSPA8EFslhFb6jJVvTgdOHqVuN6kimFyu3IdjbRVC2uvYTdfoUQgQ3Y1H8+whaJDcADROIOAs/EY1kTyOpBFYBQnWCtB65CDth9dU76AtnHynD29SonWUR42fLhmVF//ON7JOVabhUQQz+nTPOMHFxdoPwPnUY8fHWpl2V/8JReFup X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR07MB3440.namprd07.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: crPY5uSaUMtyaRl95UjIFYHbkims8HegrGnv6GrdXhGutkC6BecwGQtiZlWNiJowr18E91y9ETTAxcCrtnQ6NMzhgazTRx12NYPBh4vFz+9zGy7oWECMnaxWT34qCOk1UYryNDgWdePJk+kajnt3VdNjiohv018swtLnw1tsQXMXAagVuFGRCXesR6tlWaFvbBMgeZuu3TMzL7jGcHe5uA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 216c764e-dc5a-4493-5aa9-08d7f3bfed4a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 May 2020 02:23:14.4299 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7NAM10HT066 Content-Type: text/plain From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2707 Ecc fails with Python 3.8 because it uses the deprecated time.clock() function - https://docs.python.org/3.7/library/time.html#time.clock This change updates EccMain.py to use time.perf_counter(). Cc: Bob Feng Cc: Liming Gao Signed-off-by: Michael Kubacki --- BaseTools/Source/Python/Ecc/EccMain.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Ecc/EccMain.py b/BaseTools/Source/Python/Ecc/EccMain.py index 560bb9fd7a31..72edbea3b883 100644 --- a/BaseTools/Source/Python/Ecc/EccMain.py +++ b/BaseTools/Source/Python/Ecc/EccMain.py @@ -2,6 +2,7 @@ # This file is used to be the main entrance of ECC tool # # Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -406,9 +407,9 @@ if __name__ == '__main__': EdkLogger.Initialize() EdkLogger.IsRaiseError = False - StartTime = time.clock() + StartTime = time.perf_counter() Ecc = Ecc() - FinishTime = time.clock() + FinishTime = time.perf_counter() BuildDuration = time.strftime("%M:%S", time.gmtime(int(round(FinishTime - StartTime)))) EdkLogger.quiet("\n%s [%s]" % (time.strftime("%H:%M:%S, %b.%d %Y", time.localtime()), BuildDuration)) -- 2.16.3.windows.1