From dc1db4580af79baeab0013fc5553025b317e3e29 Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Mon, 25 Jul 2016 17:50:49 +0100 Subject: [PATCH] Error check clock_gettime --- util/usage.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/usage.cc b/util/usage.cc index f469f1971..6ece5714d 100644 --- a/util/usage.cc +++ b/util/usage.cc @@ -64,7 +64,7 @@ Wall GetWall() { typedef struct timespec Wall; Wall GetWall() { Wall ret; - clock_gettime(CLOCK_MONOTONIC, &ret); + UTIL_THROW_IF(-1 == clock_gettime(CLOCK_MONOTONIC, &ret), ErrnoException, "Could not get wall time"); return ret; } #endif