From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4068AA0A0E; Thu, 29 Apr 2021 09:12:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 040D241122; Thu, 29 Apr 2021 09:12:39 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 2AAA84067E for ; Thu, 29 Apr 2021 09:12:37 +0200 (CEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Date: Thu, 29 Apr 2021 09:12:35 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35C61723@smartserver.smartshare.dk> In-Reply-To: <1619662241-61955-1-git-send-email-humin29@huawei.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [dpdk-dev] [PATCH v2] eal: fix use wrong time API Thread-Index: Adc8nNyzPL8cm8VmQOOyv1pHaQLW9wAKhzOg References: <1619597563-56716-1-git-send-email-humin29@huawei.com> <1619662241-61955-1-git-send-email-humin29@huawei.com> From: =?utf-8?B?TW9ydGVuIEJyw7hydXA=?= To: "Min Hu (Connor)" , Cc: , , Subject: Re: [dpdk-dev] [PATCH v2] eal: fix use wrong time API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" PiBGcm9tOiBkZXYgW21haWx0bzpkZXYtYm91bmNlc0BkcGRrLm9yZ10gT24gQmVoYWxmIE9mIE1p biBIdSAoQ29ubm9yKQ0KPiBTZW50OiBUaHVyc2RheSwgQXByaWwgMjksIDIwMjEgNDoxMSBBT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