clock-monotonic.cpp

来自「奇趣公司比较新的qt/emd版本」· C++ 代码 · 共 17 行

CPP
17
字号
#include <unistd.h>#include <time.h>int main(int, char **){#if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK-0 >= 0)    timespec ts;    clock_gettime(CLOCK_MONOTONIC, &ts);#else#  error "Feature _POSIX_MONOTONIC_CLOCK not available"    // MIPSpro doesn't understand #error, so force a compiler error    force_compiler_error = true; #endif    return 0;}

⌨️ 快捷键说明

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