From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-x22e.google.com (mail-lf0-x22e.google.com [IPv6:2a00:1450:4010:c07::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 30CBC8030B for ; Sun, 5 Mar 2017 20:20:28 -0800 (PST) Received: by mail-lf0-x22e.google.com with SMTP id k202so67021217lfe.1 for ; Sun, 05 Mar 2017 20:20:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=2rcWJqudL3/hRN6yIQ/1zUgjdmsfr4UpVhI2JGwaApM=; b=Ys6rx908+E1TOaXSUXq0MeNbywYZJ/8bhK/yZ5HpdADuq0yExRaFSg/tUBP0tv1WPT xavv1GO1XOusv/8wt6nDreZYG3hn/+rbuaJXyojzAU6jNGxrrNGd7t0Le0mdTGF9BWzj gNJkZa6Xn3LYEJL9QS10XoyIqdR28OqiKmsfnF/l5uIvj+a4OAshm2uqWYAupcIJFchY PfI13UHMMSW2hn3py/qKMYJKJflf6H8Mvl7OtouCFZvNEgqZWz5ZedYctp9o+jJFk4x+ CBmggWFSJljRVj14ptkrhuyZsP6TzXY1t5R7rqk+wbWQ0ksKme2iTadt0gzauMRfIuSi aCyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=2rcWJqudL3/hRN6yIQ/1zUgjdmsfr4UpVhI2JGwaApM=; b=pTiC8IiOETlXhfSAaCiTJ/sJSZC7nIBsjQvdLClATAJ1oPXANGsmkqmBjt3o/FR1vn 5jNfgo6+xyyXGfLd9iMWVtU0WS2pJCY9UUIf6rpXJti45TcNCz92wYYqnP9gzFzeLeFP /buhDTXt+4awmX5v+b/L7MIoekDhc68lSVOV4LJf2Blg32otCXeui5wPUbY215hLjRf/ QD9vy9qnG6uC1Akp8zszPo66pz3WyzhJDZn4PGXxBLsa2nO6Gpb8kIJFhL9QL6oXdCH6 ti4qDgjb+fuoIg+3kMEoNP6vSqJsFN9S5gtgTk7QV+vRKlbX8uq8htWobdEI67kevX13 aKeA== X-Gm-Message-State: AMke39lMs9wZWOw/PmoGktVVwYvUKhz4rhoD+uWfshltChvbMaaJnfs8xj37Q4v61RsumZAvmdiIXBT9w01JnA== X-Received: by 10.25.93.86 with SMTP id p22mr4168660lfj.9.1488774026150; Sun, 05 Mar 2017 20:20:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.72.213 with HTTP; Sun, 5 Mar 2017 20:20:25 -0800 (PST) In-Reply-To: References: From: Arka Sharma Date: Mon, 6 Mar 2017 09:50:25 +0530 Message-ID: To: "Kinney, Michael D" Cc: Michael Zimmermann , "edk2-devel@lists.01.org" 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: Mon, 06 Mar 2017 04:20:28 -0000 Content-Type: text/plain; charset=UTF-8 Thanks Michael for your reply.The function GetPerformanceCounter() is returning 0 is my platform. On Thu, Mar 2, 2017 at 11:38 PM, Kinney, Michael D wrote: > 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 Michael >> 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" >> >> AFAIK the only way to do that is to use the platform specific TimerLib >> like this: >> >> UINT64 >> GetTimeMs ( >> VOID >> ) >> { >> return GetTimeInNanoSecond(GetPerformanceCounter()) / 1000000ULL; >> } >> >> Thanks >> Michael >> >> On Thu, Mar 2, 2017 at 12:53 PM, Arka Sharma wrote: >> > gRT->GetTime() is accurate about seconds.Is there any way to calculate >> > time difference in milliseconds ? >> > Let's say >> > >> > Time1 = GetTimeMs(); >> > >> > // >> > // Some tasks >> > // >> > >> > Time2 = 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