From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::22f]) (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 4F3DA8030B for ; Sun, 5 Mar 2017 20:30:22 -0800 (PST) Received: by mail-lf0-x22f.google.com with SMTP id a6so67076386lfa.0 for ; Sun, 05 Mar 2017 20:30:22 -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=5yVqheljtZAiwGvR6hPZs/66uCmPL6bJQSywnxjSoww=; b=VYFMCS+iJwotJsFvu4PV+fusVoepBjYNjsmCshRhzafNECiXyGogQBpaoljSLCRY8W uZhr9Sa8GKoMsSuadkY6BLwEHYVDW7w2ZK0pX892hWYLC7+Iw9PoQ30EgNmKiIe/Q9gV RO25iHQo82XBfbtenBkf5izj7QJfiYo8HetfMzKjZXoAqE8BcsjAsQiUtnx6MTc4yium FGXnFNFMx8iiq4nDxzGe1AKM9K2oHbysWQWldS2olCjSDj4C5mC5agxnIF9JLh9NfAzC hxyKxwR8sEroSWz1yRC2U80CJ6PWXSXYHgmn6JPnMrBW2FIZxflab2YEJBwq9xEkDy6b ntCg== 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=5yVqheljtZAiwGvR6hPZs/66uCmPL6bJQSywnxjSoww=; b=AWuM0KRqllcNDW8AWWjEjB5lDKEmhEH1ZYMr7bbvR0ric0r86LslwIfAnMTr5Z/wa+ 7SYrYELQ7GYmyXOWRdIaBvdwUF1uTJy3WPjVecM9a9yO3lYv3XT0I4813fw9xK0g7+ON ZJxUG2hAZ80eNaLdlqVNY8oWDxXukR+YZETcTIeshau0U4RYDGI6ox3PJPe/iRu5Kg9C J6v9Df//1PmujUDQd9NZI+Yu6iyncV6NcrFqX0aqIk21pogaYm0KCHidSPFsX9FfIagB MUJhmcaB4CZh2wBQdPf41WXY0rfmKuJhORca9TQAGTC49tC9WYTOTcDVF4nfnF1t5qCy H/wg== X-Gm-Message-State: AMke39kriVd5AlPzPdZs0CLF7cfqv+H+8PTzoASXbTHhTWAjxoQC82O6JBaK2NdY5XNiETvfOkacADRLFq+9ww== X-Received: by 10.46.77.193 with SMTP id c62mr4446559ljd.68.1488774620509; Sun, 05 Mar 2017 20:30:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.72.213 with HTTP; Sun, 5 Mar 2017 20:30:19 -0800 (PST) In-Reply-To: References: From: Arka Sharma Date: Mon, 6 Mar 2017 10:00:19 +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:30:22 -0000 Content-Type: text/plain; charset=UTF-8 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 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