2012-04-04 1 views

답변

1

당신은 주어진 시간 간격 후 중지 바쁜 루프를 사용할 수 있습니다 감사합니다. 이것은 1 초 동안 잠들어야한다. (잘 작동하는지 모르겠다. 나는 time.h 헤더를보고 함께 모인다.)

#include <linux/time.h> 

struct timespec start_ts = current_kernel_time(); 
s64 start = timespec_to_ns(&start_ts); 
do { 
    struct timespec now_ts = current_kernel_time(); 
    s64 now = timespec_to_ns(&now_ts); 
} while (now - start < 1000000000ULL); 
+0

나는 고맙다. – moul

관련 문제