blob: 8656be08513b178ab64e4c716ca2d4f0a9378900 [file] [log] [blame]
David Ahernfdf9dc42016-11-29 10:15:41 -07001#ifndef _TIME_UTILS_H_
2#define _TIME_UTILS_H_
3
Arnaldo Carvalho de Meloc5e40272017-04-19 16:12:39 -03004#include <stddef.h>
5#include <linux/types.h>
6
David Ahernfdf9dc42016-11-29 10:15:41 -07007struct perf_time_interval {
8 u64 start, end;
9};
10
David Ahernc284d662016-11-29 10:15:42 -070011int parse_nsec_time(const char *str, u64 *ptime);
12
David Ahernfdf9dc42016-11-29 10:15:41 -070013int perf_time__parse_str(struct perf_time_interval *ptime, const char *ostr);
14
15bool perf_time__skip_sample(struct perf_time_interval *ptime, u64 timestamp);
16
Arnaldo Carvalho de Meloc5e40272017-04-19 16:12:39 -030017int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz);
18
19int fetch_current_timestamp(char *buf, size_t sz);
20
David Ahernfdf9dc42016-11-29 10:15:41 -070021#endif