sleep与usleep

2019-07-12 19:28发布

sleep

unsigned sleep(unsigned seconds);
单位是秒s,sleep(1)为延迟1秒

usleep

void usleep(int micro_seconds);
单位是微秒us, usleep(1)为延迟1微妙