summaryrefslogtreecommitdiff
path: root/Userland/test-crypto.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2020-08-27 17:00:00 -0400
committerAndreas Kling <kling@serenityos.org>2020-08-28 09:17:01 +0200
commit88319b188e1b83d11f2ed9ee07427e3c44a95594 (patch)
tree28c7bd9289f818a72245b210803dbe77b1d9c75e /Userland/test-crypto.cpp
parentab87d42200eca5796eb188b50c8fde1ed5e92e5f (diff)
downloadserenity-88319b188e1b83d11f2ed9ee07427e3c44a95594.zip
Userland: Stop passing ignored timezones to gettimeofday
Diffstat (limited to 'Userland/test-crypto.cpp')
-rw-r--r--Userland/test-crypto.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Userland/test-crypto.cpp b/Userland/test-crypto.cpp
index 47a573abf9..21ce755b76 100644
--- a/Userland/test-crypto.cpp
+++ b/Userland/test-crypto.cpp
@@ -58,7 +58,6 @@ static bool in_ci = false;
static struct timeval start_time {
0, 0
};
-static struct timezone tz;
static bool g_some_test_failed = false;
static bool encrypting = true;
@@ -476,18 +475,18 @@ auto main(int argc, char** argv) -> int
return 1;
}
-#define I_TEST(thing) \
- { \
- printf("Testing " #thing "... "); \
- fflush(stdout); \
- gettimeofday(&start_time, &tz); \
+#define I_TEST(thing) \
+ { \
+ printf("Testing " #thing "... "); \
+ fflush(stdout); \
+ gettimeofday(&start_time, nullptr); \
}
#define PASS \
{ \
struct timeval end_time { \
0, 0 \
}; \
- gettimeofday(&end_time, &tz); \
+ gettimeofday(&end_time, nullptr); \
time_t interval_s = end_time.tv_sec - start_time.tv_sec; \
suseconds_t interval_us = end_time.tv_usec; \
if (interval_us < start_time.tv_usec) { \