From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9B232821EE for ; Thu, 2 Mar 2017 10:09:54 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 02 Mar 2017 10:09:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,232,1484035200"; d="scan'208";a="1104081876" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by orsmga001.jf.intel.com with ESMTP; 02 Mar 2017 10:09:54 -0800 Received: from orsmsx161.amr.corp.intel.com (10.22.240.84) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 2 Mar 2017 10:09:54 -0800 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.30]) by ORSMSX161.amr.corp.intel.com ([169.254.4.71]) with mapi id 14.03.0248.002; Thu, 2 Mar 2017 10:08:42 -0800 From: "Kinney, Michael D" To: Michael Zimmermann , Arka Sharma CC: "edk2-devel@lists.01.org" Thread-Topic: [edk2] "[edk] Caculating time delay in milliseconds" Thread-Index: AQHSk0u+kUtMv3MYO0+dEojFJmCXRaGB+iuA///erMA= Date: Thu, 2 Mar 2017 18:08:41 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWNkYzQ2MGYtN2RiNC00ZGI2LWE4OTEtOWM2ZTE4MTdjMGQyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlBiaHplVXVSVStEVlB1SkllSUpjRU92MFpab3MxbW1QWnZ3K0Y5XC9iWGZFPSJ9 x-originating-ip: [10.22.254.140] MIME-Version: 1.0 Subject: Re: "[edk] Caculating time delay in milliseconds" X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2017 18:09:54 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable For UEFI Drivers/Applications there is also the EFI_TIMESTAMP_PROTOCOL if it is available on your platform. Mike > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Mi= chael > Zimmermann > Sent: Thursday, March 2, 2017 4:06 AM > To: Arka Sharma > Cc: edk2-devel@lists.01.org > Subject: Re: [edk2] "[edk] Caculating time delay in milliseconds" >=20 > AFAIK the only way to do that is to use the platform specific TimerLib > like this: >=20 > UINT64 > GetTimeMs ( > VOID > ) > { > return GetTimeInNanoSecond(GetPerformanceCounter()) / 1000000ULL; > } >=20 > Thanks > Michael >=20 > On Thu, Mar 2, 2017 at 12:53 PM, Arka Sharma wrot= e: > > gRT->GetTime() is accurate about seconds.Is there any way to calculate > > time difference in milliseconds ? > > Let's say > > > > Time1 =3D GetTimeMs(); > > > > // > > // Some tasks > > // > > > > Time2 =3D GetTimeMs(); > > > > // > > // Time taken > > // > > GetTimeDiff (Time1, Time2); > > > > Something like this > > > > Regards, > > Arka > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel