diff --git a/host/lib/usrp/dboard_iface.cpp b/host/lib/usrp/dboard_iface.cpp index 9445e6abf..d23e469f9 100644 --- a/host/lib/usrp/dboard_iface.cpp +++ b/host/lib/usrp/dboard_iface.cpp @@ -19,7 +19,10 @@ void dboard_iface::sleep(const std::chrono::nanoseconds& time) // FIXME: Create a delay in the FPGA on the device. auto cmd_time = get_command_time(); if (cmd_time.get_real_secs() != 0.0) { - set_command_time(cmd_time + uhd::time_spec_t(time.count())); + // Cast to double-represented duration so that time_spec_t() ctor knows + // which overloaded ctor to choose + const std::chrono::duration time_s = time; + set_command_time(cmd_time + uhd::time_spec_t(time_s.count())); } else { // nanosleep is not really accurate in userland and it is also not very // cross-platform. So just sleep for the minimum amount of time in us.