From: Josh Steadmon <steadmon@google.com>
To: git@vger.kernel.org, git@jeffhostetler.com
Subject: [PATCH 1/2] date: make get_time() public
Date: Wed, 13 Mar 2019 16:33:28 -0700 [thread overview]
Message-ID: <e6b01ad4bfe48cbf09c120756d0e7cac198ea6f0.1552519463.git.steadmon@google.com> (raw)
In-Reply-To: <cover.1552519463.git.steadmon@google.com>
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(-)
diff --git a/cache.h b/cache.h
index abd518a9a2..0a2c436d0a 100644
--- a/cache.h
+++ b/cache.h
@@ -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);
diff --git a/date.c b/date.c
index 8126146c50..33576d2deb 100644
--- a/date.c
+++ b/date.c
@@ -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;
--
2.21.0.360.g471c308f928-goog
next prev parent reply other threads:[~2019-03-13 23:33 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-13 23:33 [PATCH 0/2] Randomize / timestamp trace2 targets Josh Steadmon
2019-03-13 23:33 ` Josh Steadmon [this message]
2019-03-13 23:33 ` [PATCH 2/2] trace2: randomize/timestamp " Josh Steadmon
2019-03-13 23:49 ` Ævar Arnfjörð Bjarmason
2019-03-15 18:39 ` Jeff Hostetler
2019-03-15 19:26 ` Ævar Arnfjörð Bjarmason
2019-03-15 20:14 ` Jeff Hostetler
2019-03-15 20:43 ` Josh Steadmon
2019-03-15 20:49 ` Josh Steadmon
2019-03-18 1:40 ` Junio C Hamano
2019-03-19 3:17 ` Jeff King
2019-03-14 0:16 ` Jeff King
2019-03-14 6:07 ` Junio C Hamano
2019-03-14 14:34 ` [PATCH 0/2] Randomize / timestamp " Johannes Schindelin
2019-03-15 20:37 ` Josh Steadmon
2019-03-15 19:18 ` Jeff Hostetler
2019-03-15 20:38 ` Josh Steadmon
2019-03-18 12:50 ` Jeff Hostetler
2019-03-21 0:16 ` [PATCH v2 0/1] Write trace2 output to directories Josh Steadmon
2019-03-21 0:16 ` [PATCH v2 1/1] trace2: write to directory targets Josh Steadmon
2019-03-21 2:04 ` Junio C Hamano
2019-03-21 17:43 ` Jeff Hostetler
2019-03-22 3:30 ` Junio C Hamano
2019-03-22 14:20 ` Jeff Hostetler
2019-03-21 21:09 ` [PATCH v3 0/1] Write trace2 output to directories Josh Steadmon
2019-03-21 21:09 ` [PATCH v3 1/1] trace2: write to directory targets Josh Steadmon
2019-03-23 20:44 ` Ævar Arnfjörð Bjarmason
2019-03-24 12:33 ` Junio C Hamano
2019-03-24 14:51 ` Ævar Arnfjörð Bjarmason
2019-03-25 2:21 ` Junio C Hamano
2019-03-25 8:21 ` Ævar Arnfjörð Bjarmason
2019-03-25 16:29 ` Jeff Hostetler
2019-03-21 21:16 ` [PATCH v3 0/1] Write trace2 output to directories Jeff Hostetler
2019-03-22 5:23 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e6b01ad4bfe48cbf09c120756d0e7cac198ea6f0.1552519463.git.steadmon@google.com \
--to=steadmon@google.com \
--cc=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).