diff options
author | Josh Blum <josh@joshknows.com> | 2010-09-23 18:56:15 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-09-23 18:56:15 -0700 |
commit | 5d6d25b49cc783ef012410064bc9eb0e66e50227 (patch) | |
tree | cde46dbfc84917477d93d07440f59d7537b57e71 /host/examples | |
parent | 5fc96b27b9493506bd7ad60eb37f98f651de6545 (diff) | |
parent | 188162a4dd59b47cf95d4be82e510faf9675a55d (diff) | |
download | uhd-5d6d25b49cc783ef012410064bc9eb0e66e50227.tar.gz uhd-5d6d25b49cc783ef012410064bc9eb0e66e50227.tar.bz2 uhd-5d6d25b49cc783ef012410064bc9eb0e66e50227.zip |
Merge branch 'libusb_win'
Diffstat (limited to 'host/examples')
-rw-r--r-- | host/examples/test_pps_input.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/host/examples/test_pps_input.cpp b/host/examples/test_pps_input.cpp index d1b49d320..4b2bb62a3 100644 --- a/host/examples/test_pps_input.cpp +++ b/host/examples/test_pps_input.cpp @@ -31,7 +31,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //variables to be set by po std::string args; - float seconds; + double seconds; //setup the program options po::options_description desc("Allowed options"); @@ -60,20 +60,20 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ std::cout << "Set time to known value (100.0) without regard to pps:" << std::endl; sdev->set_time_now(uhd::time_spec_t(100.0)); boost::this_thread::sleep(boost::posix_time::seconds(1)); - std::cout << boost::format("Reading time 1 second later: %f\n") % (sdev->get_time_now().get_full_secs()) << std::endl; + std::cout << boost::format("Reading time 1 second later: %f\n") % (sdev->get_time_now().get_real_secs()) << std::endl; //store the time to see if PPS resets it - seconds = sdev->get_time_now().get_full_secs(); + seconds = sdev->get_time_now().get_real_secs(); //set a known time at next PPS, check that time increments uhd::time_spec_t time_spec = uhd::time_spec_t(0.0); std::cout << "Set time to known value (0.0) at next pps:" << std::endl; sdev->set_time_next_pps(time_spec); boost::this_thread::sleep(boost::posix_time::seconds(1)); - std::cout << boost::format("Reading time 1 second later: %f\n") % (sdev->get_time_now().get_full_secs()) << std::endl; + std::cout << boost::format("Reading time 1 second later: %f\n") % (sdev->get_time_now().get_real_secs()) << std::endl; //finished - if (seconds > sdev->get_time_now().get_full_secs()){ + if (seconds > sdev->get_time_now().get_real_secs()){ std::cout << std::endl << "Success!" << std::endl << std::endl; return 0; } else { |