summaryrefslogtreecommitdiff
path: root/common-main.c
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2019-04-15 20:39:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-16 04:37:06 (GMT)
commita089724958a99924d9ec7ff60a6aea63d03448f2 (patch)
treef1064e35b8f752995f275c0c78fb642228d95857 /common-main.c
parent1703751f21d286b383c198157a1342c35ebc11b7 (diff)
downloadgit-a089724958a99924d9ec7ff60a6aea63d03448f2.zip
git-a089724958a99924d9ec7ff60a6aea63d03448f2.tar.gz
git-a089724958a99924d9ec7ff60a6aea63d03448f2.tar.bz2
trace2: refactor setting process starting time
Create trace2_initialize_clock() and call from main() to capture process start time in isolation and before other sub-systems are ready. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'common-main.c')
-rw-r--r--common-main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common-main.c b/common-main.c
index d484aec..6137af0 100644
--- a/common-main.c
+++ b/common-main.c
@@ -27,6 +27,8 @@ int main(int argc, const char **argv)
{
int result;
+ trace2_initialize_clock();
+
/*
* Always open file descriptors 0/1/2 to avoid clobbering files
* in die(). It also avoids messing up when the pipes are dup'ed