projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clang-tidy: add most bugprone warnings
[lttng-tools.git]
/
src
/
common
/
time.hpp
diff --git
a/src/common/time.hpp
b/src/common/time.hpp
index 724b202b1025643ea503f5f7c6dd7a24b990c4e9..2c52f334cfe00b29aeb3e125f1e707413dbbc0a5 100644
(file)
--- a/
src/common/time.hpp
+++ b/
src/common/time.hpp
@@
-9,7
+9,10
@@
#define LTTNG_TIME_H
#include <time.h>
#define LTTNG_TIME_H
#include <time.h>
+#include <ctime>
#include <stdbool.h>
#include <stdbool.h>
+#include <string>
+
#include <common/macros.hpp>
#include <common/compat/time.hpp>
#include <common/macros.hpp>
#include <common/compat/time.hpp>
@@
-29,7
+32,7
@@
#define ISO8601_STR_LEN sizeof("YYYYmmddTHHMMSS+HHMM")
#define DATETIME_STR_LEN sizeof("YYYYmmdd-HHMMSS")
#define ISO8601_STR_LEN sizeof("YYYYmmddTHHMMSS+HHMM")
#define DATETIME_STR_LEN sizeof("YYYYmmdd-HHMMSS")
-bool locale_supports_utf8(
void
);
+bool locale_supports_utf8();
#define NSEC_UNIT "ns"
#define USEC_UNIT (locale_supports_utf8() ? "µs" : "us")
#define NSEC_UNIT "ns"
#define USEC_UNIT (locale_supports_utf8() ? "µs" : "us")
@@
-59,6
+62,13
@@
struct timespec timespec_abs_diff(struct timespec ts_a, struct timespec ts_b);
* Returns 0 on success, else -1 on error.
*/
int time_to_iso8601_str(time_t time, char *str, size_t len);
* Returns 0 on success, else -1 on error.
*/
int time_to_iso8601_str(time_t time, char *str, size_t len);
+namespace lttng {
+namespace utils {
+
+std::string time_to_iso8601_str(time_t time);
+
+} /* namespace utils */
+} /* namespace lttng */
int time_to_datetime_str(time_t time, char *str, size_t len);
int time_to_datetime_str(time_t time, char *str, size_t len);
This page took
0.024048 seconds
and
4
git commands to generate.