From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=104.47.34.54; helo=nam01-by2-obe.outbound.protection.outlook.com; envelope-from=pankaj.bansal@nxp.com; receiver=edk2-devel@lists.01.org Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0054.outbound.protection.outlook.com [104.47.34.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 084EB222CF1A7 for ; Wed, 10 Jan 2018 01:26:47 -0800 (PST) Received: from MWHPR03CA0004.namprd03.prod.outlook.com (10.175.133.142) by MWHPR03MB2701.namprd03.prod.outlook.com (10.168.207.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Wed, 10 Jan 2018 09:31:58 +0000 Received: from BN1AFFO11FD018.protection.gbl (2a01:111:f400:7c10::133) by MWHPR03CA0004.outlook.office365.com (2603:10b6:300:117::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.386.5 via Frontend Transport; Wed, 10 Jan 2018 09:31:58 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD018.mail.protection.outlook.com (10.58.52.78) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Wed, 10 Jan 2018 09:31:24 +0000 Received: from uefi-workstation.ap.freescale.net ([10.232.133.75]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0A9VpXb015341; Wed, 10 Jan 2018 02:31:52 -0700 From: Pankaj Bansal To: CC: Pankaj Bansal , Michael D Kinney , Liming Gao Date: Wed, 10 Jan 2018 15:01:08 +0530 Message-ID: <1515576669-14171-1-git-send-email-pankaj.bansal@nxp.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131600502859803261; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(346002)(396003)(376002)(39380400002)(2980300002)(1109001)(1110001)(3190300001)(339900001)(189003)(199004)(6916009)(48376002)(97736004)(8656006)(50466002)(2351001)(50226002)(6666003)(106466001)(5660300001)(85426001)(4326008)(68736007)(51416003)(53936002)(54906003)(305945005)(105606002)(77096006)(81166006)(16586007)(86362001)(81156014)(36756003)(316002)(104016004)(47776003)(8676002)(8936002)(498600001)(2906002)(356003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2701; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD018; 1:bSBxL/Jd+GmAnPFez2BsLhRhSg2gpU6tUJvH+l3lcucW4/wPgdbh6ASz5NAawOUJ56OYJngKXtCbA54q/kUgBQVwKXmVLy39+IcZFfnrDc2rj0uRgkx/NAUkZuPZeApP MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a2d791a8-4d81-4e87-aa7d-08d5580cebaf X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:MWHPR03MB2701; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2701; 3:uUUWkLHSfOgs1AW1puXtb9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Ah42CkwQJ538dHXBqq6CaFOI1u2rvkkfHHwpM3jx6IgJRb8Ael2xRU4NkbD98GdGiDvhPqpcWmKIJ64dRcEKFRG0tS7ZCooFDua+DMF5hEkvcdrIMozKMVempi068PStS7Foa72WEGrRzTr1d9mPKk6ltO32c01Z5AaAqqtTLSlAISw/NYnbPchsDQ3PUtrco4Aaj+n3SVYb/oaZ/sT5r62TYJU3/jlsLPQWgup5dfPyjzhXDrfQL8hsUn4ChuW+gaplr7yulzWxUP69JIL8g2OYH3kr3bS3ZZ41c= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231023)(944510075)(944921075)(946801075)(946901075)(3002001)(10201501046)(6055026)(6096035)(20161123565025)(20161123556025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123561025)(20161123559100)(20161123563025)(201708071742011); SRVR:MWHPR03MB2701; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:MWHPR03MB2701; X-Forefront-PRVS: 0548586081 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2701; 23:3K/sIe4p3PiACuOfHpnfV1ykKhi/M4qXhLwYKQjDD?= =?us-ascii?Q?J2Od/UVctqauxbLVO2vvvMgC+9Mmg4kqssLpK3pO0CdqzTP4vpWbcrF86Dtf?= =?us-ascii?Q?EuzY1rwapq2dP1ybb4cbOqppaBrpyjIBLa8JRuSMldL6AJJatU14r5iS8Hsj?= =?us-ascii?Q?QouFYnRM3cGHD+OAd9ax1dqmEH7fvB1+EHM/cM6rMZf2G/uDNrwFu0Fu8MCS?= =?us-ascii?Q?qr7kw9ff+mPFmNchmGoXxA23tKEiTXwFyHM7jpHZvDc0a+iP8SuBqhpmFEWY?= =?us-ascii?Q?rqpWhN6WSIZBSd7zlPeKKmbHoSxD+diXwtC/H+JKZK85q1IZFwGacc6w5GeJ?= =?us-ascii?Q?i8U+fkWTBpnpNm9JRYCVpXTjEr60C/wS4eBu28nYWqxEGBweh2EyrXULyUp3?= =?us-ascii?Q?WIzm37oqg8paIrfDf9oNGvDgqZ9DxVdMEALTJuPuKzqPCfglBREnqWEjLsDI?= =?us-ascii?Q?Gp1JdCOSGSmhnfpXdMVY57UlFfuZF1e1dy0vEK6X1wz8pRc5bqGje1GWhaP3?= =?us-ascii?Q?pRGVonKmdpNcLO5awuhq64yVETQGstrf24tSoGWSUh1cZJ912zM7smVAnuGZ?= =?us-ascii?Q?friDWbG+5Kc25uh/ph43HHG96KuuKp5ePqgIY3/2Sk4l9xKcvQn4rsaveZFq?= =?us-ascii?Q?OmqKlJhBGK4hX+6xnzc1VozV2JT9pPSdm6j4NaP9kpV9UOfjCNNL96T1/JTD?= =?us-ascii?Q?0vIWzXXXUoL8A5B509uHNBsAxqSi+JOGceW7vAzVsUhBwg4fYD/vZG5kiLK0?= =?us-ascii?Q?0gfsqx10Otri0S3GYvHY8aO7hqbpSZvArgRqr8SnRFMePu8UGARJTrynI+1l?= =?us-ascii?Q?nUrMhptVeEVBNhj9PaixtF75FLFdASe1JVQfaTqzEtWZUTDF2qoFMBBKDmch?= =?us-ascii?Q?AmiHQBu3m+6BAsmr3NYZW/Amht4M7mKCYjbC3TeYwUPxVOiddpijnOkMMIL3?= =?us-ascii?Q?Ajj4cdaStpp63rDU6mO+PDfpIC4WPSeeQEPkWTjsqYB4W168pw5s3itQZdAv?= =?us-ascii?Q?Nc9haWT0LMBvITEHkhTybmZ82VjckIcE/duHa7b/FBXM5/xwhFn2cB2kgNse?= =?us-ascii?Q?JtQTMY=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2701; 6:t+ugLb3AcCPcIb6Rtu4PZf0JNYUxP1Y4B/Awt++TmTIVff24jeyb8b1/gxnCmtNN1+y2MhYHhJB6BZgp2j09YWJvEsNzdjJZbEqpS0rMTm1tfyBw6+Gw3r60umZkh1rCn7YWR0Ip+Cey2A2ysBxWWsjZUNs+naMX6AOAeE6XJIvrOnbleWCD0tg8ZDJpvURLfl3Vci9MemyoqM2sGU0z/JVpY3dtiMlnJ1zz5Db/4QvYC2+IG8KqaCoQsM0dEQ/CFrznrOq6lp//sBitoypSklDdXaWR8XT9YKrWVQ7l3SQD3aQZIxNavHObESlAQ/4jFZnmzmRRaV6nT7DxIbIoDMxuO9KTOidtenEbGDUhprg=; 5:zxaE5ZUWQleGxRdHhxyYomOyMAqK+qr+liiVQNqm5fDTOBtVrAwRWzSKQvXRzHb/MTJn9E4l7GiFm6t/65KWwj0oEBjkN9Bl9UC0KgEiogdzfX5El9bBsvsf0oxnXk95FsWFllys8fFJ5L0Bu6R2uOk+vg0z6Mnf14i9S/VlslQ=; 24:PTusXsHPbE3G083tgbxmHuJeXf4nzeEmZBX1vVE3Ldw7P46Rv++AeTFEoAylxl8Y5mRzqLZ53NxrG0M+uOBo+QxbMrCVTmsSt+RbBEt4o3U=; 7:Ew/d1eaiOLILdFY9v+GV1RmFBwNous70IabSmhMHUTedk2q5nEN0k/+m7qiJo3DSvMl6EhUdGz3hTVJ5wxAuMIq/jIleJD2WbZjORquM0rNBBLjRpTkE5rFvMfreU6b+d/ALm1JbCJUufPpTg+3mgSliwnkRldozqEWy56zerIbHO6KOFTvHOpEo90FT3ubNgrJ1tbfYHx+hW/YDl8aYaRA4SIwU8PTtwY/nZ1W+vRa9qHU5MgqjByE/lcRvVUHA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 09:31:24.4203 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a2d791a8-4d81-4e87-aa7d-08d5580cebaf X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2701 Subject: [PATCH 1/2] MdePkg/TimerLib: Add a function to calculate elapsed time X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jan 2018 09:26:48 -0000 Content-Type: text/plain This function calculates the time elaped in Naoseconds between call to this function and BaseTime, which is passed as argument. This is particularly useful in detecting timeout conditions. Cc: Michael D Kinney Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pankaj Bansal diff --git a/MdePkg/Include/Library/TimerLib.h b/MdePkg/Include/Library/TimerLib.h index ecc3ad3..82a5c5c 100644 --- a/MdePkg/Include/Library/TimerLib.h +++ b/MdePkg/Include/Library/TimerLib.h @@ -111,4 +111,20 @@ GetTimeInNanoSecond ( IN UINT64 Ticks ); +/** + Get Elapsed time in Nanoseonds w.r.t BaseTime + + This function calculates the time elaped in Naoseconds between call to this + function and BaseTime, which is passed as argument. + + @param BaseTime BaseTime in NanoSeconds. + + @return The elapsed time in nanoseconds. + +**/ +UINT64 +EFIAPI +GetElapsedTime ( + IN UINT64 BaseTime + ); #endif -- 2.7.4