start to write loop.c
This commit is contained in:
16
V2/loop.c
Normal file
16
V2/loop.c
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#include<stdio.h>
|
||||||
|
#include<time.h>
|
||||||
|
#include<pthread.h>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
struct timespec time1, time2;
|
||||||
|
time_t start, ende;
|
||||||
|
time1.tv_sec = 0;
|
||||||
|
time1.tv_nsec = 500000000000L;
|
||||||
|
time(&start);
|
||||||
|
clock_nanosleep(CLOCK_REALTIME, 0, &deadline, NULL);
|
||||||
|
time(&ende);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user