JM Project

JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。

Linux マニュアル 一覧

全文・高度検索

per page, with , order by , clip by
Results of 1 - 1 of about 1 for pclock (0.001 sec.)
Man page of PTHREAD_GETCPUCLOCKID 9414
PTHREAD_GETCPUCLOCKID Section: Linux Programmer's Manual (3) Updated: 2020-11-01 Index JM Home Page 名前 pthread_getcpuclockid - スレッドの CPU 時間時計の ID を取得する 書式 #include < pthread.h > #include < time.h > int pthread_getcpuclock ... (0) static void * thread_start(void *arg) { printf("Subthread starting infinite loop\n"); for (;;) continue; } static void pclock(char *msg, clockid_t cid) { struct timespec ts; printf("%s", msg); if (clock_gettime(cid, &ts) == -1) handle_error("clock_ ... sleeping\n"); sleep (1); printf("Main thread consuming some CPU time...\n"); for (int j = 0; j < 2000000; j++) getppid(); pclock("Process total CPU time: ", CLOCK_PROCESS_CPUTIME_ID); s = pthread_getcpuclockid(pthread_self(), &cid); if (s != 0) handle ... _error_en(s, "pthread_getcpuclockid"); pclock("Main thread CPU time: ", cid); /* The preceding 4 lines of code could have been replaced by: pclock("Main thread CPU time ...
https://man.mtool.work/man/20260915/man3/pthread_getcpuclockid.3.html
PREV 1 NEXT

リンク

日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。