thrd_sleep() did not sleep as expected, if .tv_sec > 0
#include <threads.h>
#include <time.h>
#include <stdio.h>
int main(void)
{
printf("ctime: %s", ctime(&(time_t){time(NULL)}));
printf("sleep: %d\n", thrd_sleep(&(struct timespec){.tv_sec=1}, NULL));
printf("ctime: %s", ctime(&(time_t){time(NULL)}));
printf("sleep: %d\n", thrd_sleep(&(struct timespec){.tv_sec=1,.tv_nsec=1}, NULL));
printf("ctime: %s", ctime(&(time_t){time(NULL)}));
printf("sleep: %d\n", thrd_sleep(&(struct timespec){.tv_nsec=999999999}, NULL));
printf("ctime: %s", ctime(&(time_t){time(NULL)}));
}