summaryrefslogtreecommitdiff
path: root/other
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-07-08 08:43:42 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-07-09 21:04:50 +0000
commitabc17b0f8997ab07ae66130edd5dc8c43e72c886 (patch)
tree88056839c808a9f7f8c58f55ebe273aa7b5facdb /other
parent4e21c065517d6e125cb1d1b9a13e886b3046b0d8 (diff)
Factor out time keeping code into its own module: mono_time.c.
It turns out, `unix_time` is also monotonic, and is used as such, so I've renamed the new functions to `mono_time_*`. 2018-07-08: ``` 00:01 <@irungentoo> the idea used to be that the unix_time() function could go backward in time but I think I might have started using it like if it could not after I changed it so that it would never go back in time ```
Diffstat (limited to 'other')
-rw-r--r--other/DHT_bootstrap.c1
-rw-r--r--other/bootstrap_daemon/src/tox-bootstrapd.c1
-rw-r--r--other/monolith.h1
-rw-r--r--other/travis/env-freebsd.sh3
-rw-r--r--other/travis/env.sh1
-rwxr-xr-xother/travis/toxcore-script4
6 files changed, 4 insertions, 7 deletions
diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c
index f263b471..b71ab0b1 100644
--- a/other/DHT_bootstrap.c
+++ b/other/DHT_bootstrap.c
@@ -33,6 +33,7 @@
33#include "../toxcore/LAN_discovery.h" 33#include "../toxcore/LAN_discovery.h"
34#include "../toxcore/friend_requests.h" 34#include "../toxcore/friend_requests.h"
35#include "../toxcore/logger.h" 35#include "../toxcore/logger.h"
36#include "../toxcore/mono_time.h"
36#include "../toxcore/tox.h" 37#include "../toxcore/tox.h"
37#include "../toxcore/util.h" 38#include "../toxcore/util.h"
38 39
diff --git a/other/bootstrap_daemon/src/tox-bootstrapd.c b/other/bootstrap_daemon/src/tox-bootstrapd.c
index 3c6d5d2c..fd05f8a2 100644
--- a/other/bootstrap_daemon/src/tox-bootstrapd.c
+++ b/other/bootstrap_daemon/src/tox-bootstrapd.c
@@ -38,6 +38,7 @@
38#include "../../../toxcore/LAN_discovery.h" 38#include "../../../toxcore/LAN_discovery.h"
39#include "../../../toxcore/TCP_server.h" 39#include "../../../toxcore/TCP_server.h"
40#include "../../../toxcore/logger.h" 40#include "../../../toxcore/logger.h"
41#include "../../../toxcore/mono_time.h"
41#include "../../../toxcore/onion_announce.h" 42#include "../../../toxcore/onion_announce.h"
42#include "../../../toxcore/util.h" 43#include "../../../toxcore/util.h"
43 44
diff --git a/other/monolith.h b/other/monolith.h
index 426ba0d9..356252f2 100644
--- a/other/monolith.h
+++ b/other/monolith.h
@@ -13,6 +13,7 @@
13#include "../toxcore/group.c" 13#include "../toxcore/group.c"
14#include "../toxcore/list.c" 14#include "../toxcore/list.c"
15#include "../toxcore/logger.c" 15#include "../toxcore/logger.c"
16#include "../toxcore/mono_time.c"
16#include "../toxcore/network.c" 17#include "../toxcore/network.c"
17#include "../toxcore/net_crypto.c" 18#include "../toxcore/net_crypto.c"
18#include "../toxcore/onion.c" 19#include "../toxcore/onion.c"
diff --git a/other/travis/env-freebsd.sh b/other/travis/env-freebsd.sh
index f9aa0cbf..882e9da5 100644
--- a/other/travis/env-freebsd.sh
+++ b/other/travis/env-freebsd.sh
@@ -1,9 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2 2
3CMAKE=cmake 3CMAKE=cmake
4# Asan is disabled because it's currently broken in FreeBSD 11.
5# We should try enabling it in the next FreeBSD release and see if it works.
6CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DASAN=OFF"
7NPROC=`nproc` 4NPROC=`nproc`
8CURDIR=/root 5CURDIR=/root
9RUN_TESTS=true 6RUN_TESTS=true
diff --git a/other/travis/env.sh b/other/travis/env.sh
index 7d90d395..2d3e646c 100644
--- a/other/travis/env.sh
+++ b/other/travis/env.sh
@@ -8,7 +8,6 @@ export PKG_CONFIG_PATH=$CACHE_DIR/lib/pkgconfig
8export ASTYLE=$CACHE_DIR/astyle/build/gcc/bin/astyle 8export ASTYLE=$CACHE_DIR/astyle/build/gcc/bin/astyle
9export CFLAGS="-O3 -DTRAVIS_ENV=1" 9export CFLAGS="-O3 -DTRAVIS_ENV=1"
10export CXXFLAGS="-O3 -DTRAVIS_ENV=1" 10export CXXFLAGS="-O3 -DTRAVIS_ENV=1"
11export CMAKE_EXTRA_FLAGS="-DERROR_ON_WARNING=ON"
12export MAKE=make 11export MAKE=make
13 12
14BUILD_DIR=_build 13BUILD_DIR=_build
diff --git a/other/travis/toxcore-script b/other/travis/toxcore-script
index f82fd978..ae2af416 100755
--- a/other/travis/toxcore-script
+++ b/other/travis/toxcore-script
@@ -28,14 +28,12 @@ RUN $CMAKE \
28 -B$BUILD_DIR \ 28 -B$BUILD_DIR \
29 -H. \ 29 -H. \
30 -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install \ 30 -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install \
31 -DASAN=ON \
32 -DDEBUG=ON \ 31 -DDEBUG=ON \
33 -DMUST_BUILD_TOXAV=ON \ 32 -DMUST_BUILD_TOXAV=ON \
34 -DSTRICT_ABI=ON \ 33 -DSTRICT_ABI=ON \
35 -DTEST_TIMEOUT_SECONDS=120 \ 34 -DTEST_TIMEOUT_SECONDS=120 \
36 -DTRACE=ON \ 35 -DTRACE=ON \
37 -DUSE_IPV6=$USE_IPV6 \ 36 -DUSE_IPV6=$USE_IPV6
38 $CMAKE_EXTRA_FLAGS
39 37
40export CTEST_OUTPUT_ON_FAILURE=1 38export CTEST_OUTPUT_ON_FAILURE=1
41 39