From 7ffc73fe67ebd88410ce1094d83d6e4809ffb578 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 30 Jan 2011 19:08:30 -0800 Subject: 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 --- host/include/uhd/types/time_spec.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'host/include') 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 @@ -39,6 +39,13 @@ namespace uhd{ class UHD_API time_spec_t : boost::additive, boost::totally_ordered{ 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) -- cgit v1.2.3