揮発性のメモ2

http://d.hatena.ne.jp/iww/

2018-08-26から1日間の記事一覧

timespec の足し算引き算

#include <time.h> // clock_gettime #include <stdio.h> // printf struct timespec *timessub(const struct timespec *A, const struct timespec *B, struct timespec *C) { C->tv_sec = A->tv_sec - B->tv_sec; C->tv_nsec = A->tv_nsec - B->tv_nsec; if(C->tv_nsec<0){ C</stdio.h></time.h>…