From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id AD2235A53 for ; Wed, 18 Nov 2015 11:29:44 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 18 Nov 2015 02:29:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,312,1444719600"; d="scan'208";a="602447447" Received: from unknown (HELO dpdk5.sh.intel.com) ([10.239.129.244]) by FMSMGA003.fm.intel.com with ESMTP; 18 Nov 2015 02:29:43 -0800 From: Zhihong Wang To: dev@dpdk.org Date: Tue, 17 Nov 2015 22:27:10 -0500 Message-Id: <1447817231-10510-2-git-send-email-zhihong.wang@intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1447817231-10510-1-git-send-email-zhihong.wang@intel.com> References: <1447817231-10510-1-git-send-email-zhihong.wang@intel.com> Subject: [dpdk-dev] [RFC PATCH 1/2] lib/librte_eal: Reduce timer initialization time X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2015 10:29:45 -0000 Changing from 1/2 second to 1/10 doesn't compromise the precision, and a 4/10 second is worth saving. Signed-off-by: Zhihong Wang --- lib/librte_eal/linuxapp/eal/eal_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_timer.c b/lib/librte_eal/linuxapp/eal/eal_timer.c index e0642de..4de0353 100644 --- a/lib/librte_eal/linuxapp/eal/eal_timer.c +++ b/lib/librte_eal/linuxapp/eal/eal_timer.c @@ -271,7 +271,7 @@ get_tsc_freq(void) #ifdef CLOCK_MONOTONIC_RAW #define NS_PER_SEC 1E9 - struct timespec sleeptime = {.tv_nsec = 5E8 }; /* 1/2 second */ + struct timespec sleeptime = {.tv_nsec = 1E8 }; /* 1/10 second */ struct timespec t_start, t_end; uint64_t tsc_hz; -- 2.5.0