diff options
Diffstat (limited to 'testing/Messenger_test.c')
-rw-r--r-- | testing/Messenger_test.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/testing/Messenger_test.c b/testing/Messenger_test.c index a5abfda0..880fc514 100644 --- a/testing/Messenger_test.c +++ b/testing/Messenger_test.c | |||
@@ -107,11 +107,16 @@ int main(int argc, char *argv[]) | |||
107 | exit(0); | 107 | exit(0); |
108 | } | 108 | } |
109 | 109 | ||
110 | unix_time_update(); | 110 | Mono_Time *const mono_time = mono_time_new(); |
111 | |||
112 | if (mono_time == nullptr) { | ||
113 | fputs("Failed to allocate monotonic timer datastructure\n", stderr); | ||
114 | exit(0); | ||
115 | } | ||
111 | 116 | ||
112 | Messenger_Options options = {0}; | 117 | Messenger_Options options = {0}; |
113 | options.ipv6enabled = ipv6enabled; | 118 | options.ipv6enabled = ipv6enabled; |
114 | m = new_messenger(&options, nullptr); | 119 | m = new_messenger(mono_time, &options, nullptr); |
115 | 120 | ||
116 | if (!m) { | 121 | if (!m) { |
117 | fputs("Failed to allocate messenger datastructure\n", stderr); | 122 | fputs("Failed to allocate messenger datastructure\n", stderr); |
@@ -180,7 +185,7 @@ int main(int argc, char *argv[]) | |||
180 | perror("Initialization"); | 185 | perror("Initialization"); |
181 | 186 | ||
182 | while (1) { | 187 | while (1) { |
183 | unix_time_update(); | 188 | mono_time_update(mono_time); |
184 | 189 | ||
185 | uint8_t name[128]; | 190 | uint8_t name[128]; |
186 | const char *const filename = "Save.bak"; | 191 | const char *const filename = "Save.bak"; |