Created
October 1, 2021 01:35
-
-
Save emmiegit/ad5be96bd2e6fe5f06b8e33290273f53 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define _XOPEN_SOURCE 500 | |
| #include <limits.h> | |
| #include <time.h> | |
| #define MAX_INT(t) ((1UL << (CHAR_BIT * sizeof(t) - 1UL)) - 1UL) | |
| int main(void) | |
| { | |
| struct timespec ts; | |
| ts.tv_sec = MAX_INT(time_t); | |
| ts.tv_nsec = 0; | |
| for (;;) { | |
| if (nanosleep(&ts, NULL)) | |
| return 1; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment