79820401

Date: 2025-11-14 19:58:59
Score: 1
Natty:
Report link

To sleep for 500ms:

#include <stdio.h>
#include <time.h>

int main() {
    struct timespec ts = {
        .tv_sec = 0,
        .tv_nsec = 5e8,
    };

    printf("Sleep now!\n");

    nanosleep(&ts, NULL);

    printf("Sleeping done!\n");

    return 0;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: byte_janitor