From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web11.7670.1589440706507803320 for ; Thu, 14 May 2020 00:18:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WB1GCYrj; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589440705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E2++VknRnu/AmUCeLvivNHhHN5R3WbvnIAeoOJ5K/3k=; b=WB1GCYrj2K9BbgSNJmE3QDY6R9dk9EjIdut4QDbiv8rSfyIK+8LQpy4ON3OaCQ9lQrA+Cc 0L8B5i8bRmxUkhl3ZDHR+reFF2T5AhvcG7FVugZ28beStFXMbIuutFQawPgRlwQnXG1z5S 8ePQM/hBaTpy0YqX1iMG8LI/D/elZRY= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-379-qsLM0fgRP4uF7JfNcQ54xQ-1; Thu, 14 May 2020 03:18:20 -0400 X-MC-Unique: qsLM0fgRP4uF7JfNcQ54xQ-1 Received: by mail-wr1-f72.google.com with SMTP id d16so1086240wrv.18 for ; Thu, 14 May 2020 00:18:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=E2++VknRnu/AmUCeLvivNHhHN5R3WbvnIAeoOJ5K/3k=; b=sFp39fKZbLLOgC6WE+fLtf2LExOIW+b5UfUPBop92IUHNz+FUm7syrrFdHhnrgGdzJ mrl3A7v4NGPH2gjAU74R8ReAJ9RbLJyEkSi8AT4rrPPgrT4wkhP4v5+g24iVJW7eQFfu MigjD4Q05Gk43uiu0GKnUSZ9UsnozplSweF0dXPmcIeiCaEcTdiOeDFUWNpPIyquapV6 QL43hqRw6yY/c49ft+wIERJNJQ2dyD/V86KdbYqe78kK5jl3q4ReybjKmTjE/f6d9R+5 ad48fusQswamweO/he1UVIPCeHcfXSNZta5XfqQW6YbsHQx63a3wvqPetia8ngtyox9u 6lrw== X-Gm-Message-State: AGi0PuZJZ4lfL2COMnoM87elhkgKIZEQSFItKeV9GduzJbJXq+nN3WoW gIKiOuemaL6YIF7OdWE9VceVSlKe6YvTzFQ35W0IY5TjcGhIBKBaVPjpWPTScOaSqNEX40hVeiW 0BDOziw3oaprj5g== X-Received: by 2002:a7b:c1d2:: with SMTP id a18mr21978455wmj.176.1589440699003; Thu, 14 May 2020 00:18:19 -0700 (PDT) X-Google-Smtp-Source: APiQypLH6enhCpWEDyzm8Bk2+YxEpRRIIrTTnHiGOxUhIC6y8ojH1SDzsKu3yRckuIPxpDylIOYTcQ== X-Received: by 2002:a7b:c1d2:: with SMTP id a18mr21978432wmj.176.1589440698779; Thu, 14 May 2020 00:18:18 -0700 (PDT) Return-Path: Received: from [192.168.1.39] (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id 10sm16665759wmw.26.2020.05.14.00.18.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 May 2020 00:18:17 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools/Ecc: Replace deprecated function time.clock() To: devel@edk2.groups.io, michael.kubacki@outlook.com Cc: Bob Feng , Liming Gao References: From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <3dc2910f-e9a7-5164-ae7a-20dcbbe521f8@redhat.com> Date: Thu, 14 May 2020 09:18:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Michael, On 5/9/20 4:22 AM, Michael Kubacki wrote: > 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.
You forgot the year: 2020. With it updated: Reviewed-by: Philippe Mathieu-Daude > # 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)) >