public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Arka Sharma <arka.sw1988@gmail.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: Michael Zimmermann <sigmaepsilon92@gmail.com>,
	 "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: "[edk] Caculating time delay in milliseconds"
Date: Mon, 6 Mar 2017 10:00:19 +0530	[thread overview]
Message-ID: <CAPO=kN1VYK4JwPqs8J9kPzUd_1PVZQo0Ho6NUAjwP_Lu1sx57Q@mail.gmail.com> (raw)
In-Reply-To: <E92EE9817A31E24EB0585FDF735412F57D12258A@ORSMSX113.amr.corp.intel.com>

Thanks Mike for the reply but EFI_TIMESTAMP_PROTOCOL is not there in
my platform. I tried to open it using gBS->LocateProtocol() and it
returned EFI_NOT_FOUND

On Thu, Mar 2, 2017 at 11:38 PM, Kinney, Michael D
<michael.d.kinney@intel.com> 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 <arka.sw1988@gmail.com>
>> 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 <arka.sw1988@gmail.com> 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


  parent reply	other threads:[~2017-03-06  4:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02 11:53 "[edk] Caculating time delay in milliseconds" Arka Sharma
2017-03-02 12:05 ` Michael Zimmermann
2017-03-02 18:08   ` Kinney, Michael D
2017-03-06  4:20     ` Arka Sharma
2017-03-06  4:30     ` Arka Sharma [this message]
2017-03-06  6:52       ` Michael Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPO=kN1VYK4JwPqs8J9kPzUd_1PVZQo0Ho6NUAjwP_Lu1sx57Q@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox