⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sleep.c

📁 cygwin, 著名的在win32下模拟unix操作系统的东东
💻 C
字号:
/* libc/sys/linux/sleep.c - sleep function *//* Written 2000 by Werner Almesberger */#include <errno.h>#include <sys/types.h>#include <sys/time.h>#include <linux/times.h>unsigned int sleep(unsigned int seconds){    struct timespec ts;    ts.tv_sec = seconds;    ts.tv_nsec = 0;    if (!nanosleep(&ts,&ts)) return 0;    if (errno == EINTR) return ts.tv_sec;    return -1;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -