diff options
Diffstat (limited to 'host/lib/types')
-rw-r--r-- | host/lib/types/metadata_c.cpp | 8 | ||||
-rw-r--r-- | host/lib/types/time_spec.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/host/lib/types/metadata_c.cpp b/host/lib/types/metadata_c.cpp index 352e5278f..35e3d76c9 100644 --- a/host/lib/types/metadata_c.cpp +++ b/host/lib/types/metadata_c.cpp @@ -43,7 +43,7 @@ uhd_error uhd_rx_metadata_has_time_spec( uhd_error uhd_rx_metadata_time_spec( uhd_rx_metadata_handle h, - time_t *full_secs_out, + int64_t *full_secs_out, double *frac_secs_out ){ UHD_SAFE_C_SAVE_ERROR(h, @@ -149,7 +149,7 @@ uhd_error uhd_rx_metadata_last_error( uhd_error uhd_tx_metadata_make( uhd_tx_metadata_handle* handle, bool has_time_spec, - time_t full_secs, + int64_t full_secs, double frac_secs, bool start_of_burst, bool end_of_burst @@ -185,7 +185,7 @@ uhd_error uhd_tx_metadata_has_time_spec( uhd_error uhd_tx_metadata_time_spec( uhd_tx_metadata_handle h, - time_t *full_secs_out, + int64_t *full_secs_out, double *frac_secs_out ){ UHD_SAFE_C_SAVE_ERROR(h, @@ -265,7 +265,7 @@ uhd_error uhd_async_metadata_has_time_spec( uhd_error uhd_async_metadata_time_spec( uhd_async_metadata_handle h, - time_t *full_secs_out, + int64_t *full_secs_out, double *frac_secs_out ){ UHD_SAFE_C_SAVE_ERROR(h, diff --git a/host/lib/types/time_spec.cpp b/host/lib/types/time_spec.cpp index 907e97d1a..403c3336c 100644 --- a/host/lib/types/time_spec.cpp +++ b/host/lib/types/time_spec.cpp @@ -14,7 +14,7 @@ using namespace uhd; * Time spec constructors **********************************************************************/ #define time_spec_init(full, frac) { \ - const time_t _full = time_t(full); \ + const int64_t _full = int64_t(full); \ const double _frac = double(frac); \ const int _frac_int = int(_frac); \ _full_secs = _full + _frac_int; \ @@ -33,11 +33,11 @@ time_spec_t::time_spec_t(double secs){ time_spec_init(0, secs); } -time_spec_t::time_spec_t(time_t full_secs, double frac_secs){ +time_spec_t::time_spec_t(int64_t full_secs, double frac_secs){ time_spec_init(full_secs, frac_secs); } -time_spec_t::time_spec_t(time_t full_secs, long tick_count, double tick_rate){ +time_spec_t::time_spec_t(int64_t full_secs, long tick_count, double tick_rate){ const double frac_secs = tick_count/tick_rate; time_spec_init(full_secs, frac_secs); } @@ -45,7 +45,7 @@ time_spec_t::time_spec_t(time_t full_secs, long tick_count, double tick_rate){ time_spec_t time_spec_t::from_ticks(long long ticks, double tick_rate){ const long long rate_i = (long long)(tick_rate); const double rate_f = tick_rate - rate_i; - const time_t secs_full = time_t(ticks/rate_i); + const int64_t secs_full = int64_t(ticks/rate_i); const long long ticks_error = ticks - (secs_full*rate_i); const double ticks_frac = ticks_error - secs_full*rate_f; return time_spec_t(secs_full, ticks_frac/tick_rate); |