From e346b15bdf0a1ae036ddf3f5230ff3aeb55143f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Mon, 24 Feb 2025 16:42:24 +0100 Subject: [PATCH] Expose 'get_fmt_time' function in 'tap.h' interface --- test/tap/tap/tap.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/tap/tap/tap.h b/test/tap/tap/tap.h index f40dad0e9..635a0c14d 100644 --- a/test/tap/tap/tap.h +++ b/test/tap/tap/tap.h @@ -20,7 +20,7 @@ #ifndef TAP_H #define TAP_H -//#include "my_global.h" +#include /* @defgroup MyTAP MySQL support for performing unit tests according to @@ -91,6 +91,15 @@ extern volatile int tap_log_us; @{ */ +/** + @brief Writes current time ("%Y-%m-%d %H:%M:%S") in the supplied buffer. + + @param tm_buf Buffer to be written. + @param us True for enabling microseconds in log output. + @param len Buffer len. + */ +size_t get_fmt_time(char* tm_buf, size_t len, bool us=false); + /** Set number of tests that is planned to execute.