fdf9dc4b34
Add function to parse a user time string of the form <start>,<stop> 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 <dsahern@gmail.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1480439746-42695-2-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 lines
261 B
C
13 lines
261 B
C
#ifndef _TIME_UTILS_H_
|
|
#define _TIME_UTILS_H_
|
|
|
|
struct perf_time_interval {
|
|
u64 start, end;
|
|
};
|
|
|
|
int perf_time__parse_str(struct perf_time_interval *ptime, const char *ostr);
|
|
|
|
bool perf_time__skip_sample(struct perf_time_interval *ptime, u64 timestamp);
|
|
|
|
#endif
|