From 8e3ea14c9406f3f3e5fe613bfe59906447a195e0 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 16 Aug 2018 14:25:24 -0700 Subject: uhd: Remove usage of time_t (except when required) The C/C++ standards don't define what time_t is, only that it is arithmetic (and real for C11, and integral for C++). It should not be used in portable software and is only used as the return value for some libc calls. A common definition for time_t is int64_t, so we'll switch to that permanently in our own APIs. System APIs will of course stick with time_t. --- host/lib/utils/system_time.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/lib/utils/system_time.cpp') diff --git a/host/lib/utils/system_time.cpp b/host/lib/utils/system_time.cpp index 2434eb949..20b6dc429 100644 --- a/host/lib/utils/system_time.cpp +++ b/host/lib/utils/system_time.cpp @@ -45,7 +45,7 @@ time_spec_t uhd::get_system_time(void){ pt::ptime time_now = pt::microsec_clock::universal_time(); pt::time_duration time_dur = time_now - pt::from_time_t(0); return time_spec_t( - time_t(time_dur.total_seconds()), + int64_t(time_dur.total_seconds()), long(time_dur.fractional_seconds()), double(pt::time_duration::ticks_per_second()) ); -- cgit v1.2.3