summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-02-17 22:31:37 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2019-02-17 22:31:37 +0000
commite6c6d3bb3d369716a6cf8849f56c8ffc20cf92f3 (patch)
treef25726212cc83ecaf5a13551b77508f58a4a7a30
parentcb150e605587ab44c837f3567fe064fa091927ba (diff)
downloadlibgit2-remove_time_monotonic.tar.gz
Remove `git_time_monotonic`remove_time_monotonic
`git_time_monotonic` was added so that non-native bindings like rugged could get high-resolution timing for benchmarking. However, this is outside the scope of libgit2 *and* rugged decided not to use this function in the first place. Google suggests that absolutely _nobody_ is using this function and we don't want to be in the benchmarking business. Remove the function.
-rw-r--r--include/git2/sys/time.h31
-rw-r--r--src/util.c5
2 files changed, 0 insertions, 36 deletions
diff --git a/include/git2/sys/time.h b/include/git2/sys/time.h
deleted file mode 100644
index e4f87e6e1..000000000
--- a/include/git2/sys/time.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) the libgit2 contributors. All rights reserved.
- *
- * This file is part of libgit2, distributed under the GNU GPL v2 with
- * a Linking Exception. For full terms see the included COPYING file.
- */
-#ifndef INCLUDE_git_time_h__
-#define INCLUDE_git_time_h__
-
-#include "git2/common.h"
-
-GIT_BEGIN_DECL
-
-/**
- * Return a monotonic time value, useful for measuring running time
- * and setting up timeouts.
- *
- * The returned value is an arbitrary point in time -- it can only be
- * used when comparing it to another `git_time_monotonic` call.
- *
- * The time is returned in seconds, with a decimal fraction that differs
- * on accuracy based on the underlying system, but should be least
- * accurate to Nanoseconds.
- *
- * This function cannot fail.
- */
-GIT_EXTERN(double) git_time_monotonic(void);
-
-GIT_END_DECL
-#endif
-
diff --git a/src/util.c b/src/util.c
index 984a3d780..a49269b98 100644
--- a/src/util.c
+++ b/src/util.c
@@ -864,11 +864,6 @@ int git__utf8_iterate(const uint8_t *str, int str_len, int32_t *dst)
return length;
}
-double git_time_monotonic(void)
-{
- return git__timer();
-}
-
size_t git__utf8_valid_buf_length(const uint8_t *str, size_t str_len)
{
size_t offset = 0;