@@ -1489,6 +1489,7 @@ struct date_mode {
#define DATE_MODE(t) date_mode_from_type(DATE_##t)
struct date_mode *date_mode_from_type(enum date_mode_type type);
+void get_time(struct timeval *now);
const char *show_date(timestamp_t time, int timezone, const struct date_mode *mode);
void show_date_relative(timestamp_t time, const struct timeval *now,
struct strbuf *timebuf);
@@ -115,7 +115,7 @@ static int local_tzoffset(timestamp_t time)
return local_time_tzoffset((time_t)time, &tm);
}
-static void get_time(struct timeval *now)
+void get_time(struct timeval *now)
{
const char *x;
get_time() is the standard way to get the current time while also respecting frozen timestamps for tests. Expose this for use in other files. Signed-off-by: Josh Steadmon <steadmon@google.com> --- cache.h | 1 + date.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)