diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2009-03-23 09:34:13 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-03-23 09:34:13 (GMT) |
commit | 67ad0519fd165acee4a4d2a94fa502e9e4847bd0 (patch) | |
tree | 1dbf50b3dff8d5ca7e9344733968c72704eb15ff /config.tests/unix/clock-monotonic | |
download | Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.zip Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.tar.gz Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.tar.bz2 |
Long live Qt!
Diffstat (limited to 'config.tests/unix/clock-monotonic')
-rw-r--r-- | config.tests/unix/clock-monotonic/clock-monotonic.cpp | 16 | ||||
-rw-r--r-- | config.tests/unix/clock-monotonic/clock-monotonic.pro | 4 |
2 files changed, 20 insertions, 0 deletions
diff --git a/config.tests/unix/clock-monotonic/clock-monotonic.cpp b/config.tests/unix/clock-monotonic/clock-monotonic.cpp new file mode 100644 index 0000000..df99963 --- /dev/null +++ b/config.tests/unix/clock-monotonic/clock-monotonic.cpp @@ -0,0 +1,16 @@ +#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; +} + diff --git a/config.tests/unix/clock-monotonic/clock-monotonic.pro b/config.tests/unix/clock-monotonic/clock-monotonic.pro new file mode 100644 index 0000000..961e3a8 --- /dev/null +++ b/config.tests/unix/clock-monotonic/clock-monotonic.pro @@ -0,0 +1,4 @@ +SOURCES = clock-monotonic.cpp +CONFIG -= qt dylib +mac:CONFIG -= app_bundle +include(../clock-gettime/clock-gettime.pri) |