From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752641AbcK1Rf2 (ORCPT ); Mon, 28 Nov 2016 12:35:28 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35608 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbcK1RfT (ORCPT ); Mon, 28 Nov 2016 12:35:19 -0500 Subject: Re: [PATCH 1/6] perf tool: Add time-based utility functions To: Jiri Olsa , David Ahern References: <1480109999-36971-1-git-send-email-dsa@cumulusnetworks.com> <1480109999-36971-2-git-send-email-dsa@cumulusnetworks.com> <20161128135832.GB1928@krava> Cc: acme@kernel.org, mingo@kernel.org, peterz@infradead.org, namhyung@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org From: David Ahern Message-ID: <1edb9bd4-5697-47d4-9ca1-5f359fa00ac4@gmail.com> Date: Mon, 28 Nov 2016 10:35:15 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <20161128135832.GB1928@krava> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/28/16 6:58 AM, Jiri Olsa wrote: > On Fri, Nov 25, 2016 at 02:39:54PM -0700, David Ahern wrote: >> From: David Ahern >> >> Add function to parse a user time string of the form , >> where start and stop are time in sec.nsec format. Both start and stop >> times are optional. >> >> Add function to determine if a sample time is within a given time >> time window of interest. >> >> Signed-off-by: David Ahern >> --- >> tools/perf/util/Build | 1 + >> tools/perf/util/time-utils.c | 85 ++++++++++++++++++++++++++++++++++++++++++++ >> tools/perf/util/time-utils.h | 12 +++++++ >> 3 files changed, 98 insertions(+) >> create mode 100644 tools/perf/util/time-utils.c >> create mode 100644 tools/perf/util/time-utils.h >> >> diff --git a/tools/perf/util/Build b/tools/perf/util/Build >> index 1dc67efad634..78f139978e7a 100644 >> --- a/tools/perf/util/Build >> +++ b/tools/perf/util/Build >> @@ -87,6 +87,7 @@ libperf-y += help-unknown-cmd.o >> libperf-y += mem-events.o >> libperf-y += vsprintf.o >> libperf-y += drv_configs.o >> +libperf-y += time-utils.o > > I think we should call it just time.c, it's already in 'util' directory can't rename time-utils.h to time.h because the include will get confused with and if the header is named time-utils.h why not keep the c-file as time-utils.c?