Commit graph

5 commits

Author SHA1 Message Date
Martin Braun
876d4150aa uhd: Apply clang-format against all .cpp and .hpp files in host/
Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of
files that clang-format gets applied against.
2020-03-03 08:51:32 -06:00
Martin Braun
f7cb6ee0d6 lib: Simplify implementation of uhd::get_system_time() to use <chrono>
uhd::get_system_time() is currently only used in USRP1 code, and it
turns out that our "optimized", platform-dependent implementation still
is a little slower than straight-up chrono. We therefore remove all the
special cases, and replace them with a single, standard solution.
2019-11-26 11:49:12 -08:00
Martin Braun
8e3ea14c94 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.
2018-08-20 16:56:43 -07:00
Martin Braun
d4eaee390d lib: move atomic.hpp and system_time.hpp to uhdlib 2018-04-06 18:39:11 -07:00
Martin Braun
7fa1f6ed07 uhd: Moved get_system_time outside of public API
uhd::get_system_time() is an abstracted way of reading back a time, and
is not UHD-specific. As such, there's no reason to keep it in the public
part of the API where we're contractually obligated not to touch it.
Instead, moving it to the internal API space.
2018-03-05 13:53:45 -08:00