summaryrefslogtreecommitdiff
path: root/src/common/compat_time.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-07-21 10:30:21 +0200
committerNick Mathewson <nickm@torproject.org>2016-07-21 10:30:21 +0200
commit72a1f0180dbbc0a96e128d940b53ebf0f1c570d7 (patch)
tree1d78b3133768bd6a058d5af421b8e91fffa408de /src/common/compat_time.c
parent2999f0b33fec8e91ba8e4680d3f9d03b09fe9501 (diff)
downloadtor-72a1f0180dbbc0a96e128d940b53ebf0f1c570d7.tar.gz
tor-72a1f0180dbbc0a96e128d940b53ebf0f1c570d7.zip
Revert "Make the monotonic{_coarse,}_get() functions mockable."
This reverts commit 2999f0b33fec8e91ba8e4680d3f9d03b09fe9501.
Diffstat (limited to 'src/common/compat_time.c')
-rw-r--r--src/common/compat_time.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/common/compat_time.c b/src/common/compat_time.c
index 974cf32b49..b7d69cf400 100644
--- a/src/common/compat_time.c
+++ b/src/common/compat_time.c
@@ -220,8 +220,8 @@ monotime_init_internal(void)
/**
* Set "out" to the most recent monotonic time value
*/
-MOCK_IMPL(void,
-monotime_get,(monotime_t *out))
+void
+monotime_get(monotime_t *out)
{
out->abstime_ = mach_absolute_time();
}
@@ -251,16 +251,16 @@ monotime_init_internal(void)
/* no action needed. */
}
-MOCK_IMPL(void,
-monotime_get,(monotime_t *out))
+void
+monotime_get(monotime_t *out)
{
int r = clock_gettime(CLOCK_MONOTONIC, &out->ts_);
tor_assert(r == 0);
}
#ifdef CLOCK_MONOTONIC_COARSE
-MOCK_IMPL(void,
-monotime_coarse_get,(monotime_coarse_t *out))
+void
+monotime_coarse_get(monotime_coarse_t *out)
{
int r = clock_gettime(CLOCK_MONOTONIC_COARSE, &out->ts_);
tor_assert(r == 0);
@@ -316,8 +316,8 @@ monotime_init_internal(void)
// FreeLibrary(h) ?
}
-MOCK_IMPL(void,
-monotime_get,(monotime_t *out))
+void
+monotime_get(monotime_t *out)
{
if (BUG(monotime_initialized == 0)) {
monotime_init();
@@ -337,8 +337,8 @@ monotime_get,(monotime_t *out))
LeaveCriticalSection(&monotime_lock);
}
-MOCK_IMPL(void,
-monotime_coarse_get,(monotime_coarse_t *out))
+void
+monotime_coarse_get(monotime_coarse_t *out)
{
if (GetTickCount64_fn) {
out->tick_count_ = (int64_t)GetTickCount64_fn();
@@ -396,8 +396,8 @@ monotime_init_internal(void)
tor_mutex_init(&monotime_lock);
}
-MOCK_IMPL(void,
-monotime_get,(monotime_t *out))
+void
+monotime_get(monotime_t *out)
{
if (BUG(monotime_initialized == 0)) {
monotime_init();