diff options
author | Josh Blum <josh@joshknows.com> | 2011-01-30 19:08:30 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-01-30 19:08:30 -0800 |
commit | 7ffc73fe67ebd88410ce1094d83d6e4809ffb578 (patch) | |
tree | cf0b4e231c2eb329e3dc1ad014894aa940f25278 /host/include | |
parent | 00f5417548a06827a625f3d6b086c3542c35c32e (diff) | |
download | uhd-7ffc73fe67ebd88410ce1094d83d6e4809ffb578.tar.gz uhd-7ffc73fe67ebd88410ce1094d83d6e4809ffb578.tar.bz2 uhd-7ffc73fe67ebd88410ce1094d83d6e4809ffb578.zip |
uhd: implemented high-res get time in time_spec_t
clock_gettime for linux,
mach_absolute_time for macos,
QueryPerformanceFrequency for windows,
and fallback to boost microsec_clock
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/types/time_spec.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/host/include/uhd/types/time_spec.hpp b/host/include/uhd/types/time_spec.hpp index 57d002d48..2046fbd3f 100644 --- a/host/include/uhd/types/time_spec.hpp +++ b/host/include/uhd/types/time_spec.hpp @@ -40,6 +40,13 @@ namespace uhd{ public: /*! + * Get the system time in time_spec_t format. + * Uses the highest precision clock available. + * \return the system time as a time_spec_t + */ + static time_spec_t get_system_time(void); + + /*! * Create a time_spec_t from a real-valued seconds count. * \param secs the real-valued seconds count (default = 0) */ |