{"height":"190","version":"1.0","url":"https://iww.hateblo.jp/entry/20240520/msec_sleep","description":"#include <stdio.h> #include <time.h> #include <signal.h> #include <errno.h> /// \u3061\u3083\u3093\u3068\u30df\u30ea\u79d2\u5bdd\u308b\u95a2\u6570 int sleep_msec(long long msec) { struct timespec ts; ts.tv_sec = msec/1000; ts.tv_nsec = (msec%1000)*1000000; int result; for(;;){ result = nanosleep(&ts, &ts); if(result==0 || errno!=EINTR) break; // puts(\"\u3082\u2026","provider_name":"Hatena Blog","image_url":"https://cdn.user.blog.st-hatena.com/default_entry_og_image/42132/1685946694840016","categories":["C","Linux"],"type":"rich","provider_url":"https://hatena.blog","blog_title":"\u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12","blog_url":"https://iww.hateblo.jp/","author_url":"https://blog.hatena.ne.jp/iww/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fiww.hateblo.jp%2Fentry%2F20240520%2Fmsec_sleep\" title=\" C\u3067\u3001\u30df\u30ea\u79d2\u30b9\u30ea\u30fc\u30d7\u3059\u308b - \u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"iww","published":"2024-05-20 08:30:00","title":" C\u3067\u3001\u30df\u30ea\u79d2\u30b9\u30ea\u30fc\u30d7\u3059\u308b","width":"100%"}