diff --git a/main.c b/main.c index 77f0c06..aa5c54f 100644 --- a/main.c +++ b/main.c @@ -116,8 +116,9 @@ CURLcode curl_get(const char *const url, struct memory *chunk) long long current_timestamp() { - time_t timestamp = time(NULL); - return timestamp * 1000; + const time_t timestamp = time(NULL); + srand(timestamp); + return timestamp * 1000 + (rand() % 1999 - 999); // -999 ~ 999 } size_t cb(char *data, size_t size, size_t nmemb, void *clientp) @@ -197,7 +198,7 @@ void parise(void *arg) cJSON_Delete(json); } - printf("Signal: exit, T%d exiting\n", idx); + fprintf(stderr, "\rSignal Received: exit. T%d exiting\n", idx); } void exit_handler()