summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-09-23 18:47:50 -0700
committerJosh Blum <josh@joshknows.com>2010-09-23 18:47:50 -0700
commit188162a4dd59b47cf95d4be82e510faf9675a55d (patch)
treecde46dbfc84917477d93d07440f59d7537b57e71 /host
parent42576f1ed98735a69a20cc788d09acd82cb69ae8 (diff)
downloaduhd-188162a4dd59b47cf95d4be82e510faf9675a55d.tar.gz
uhd-188162a4dd59b47cf95d4be82e510faf9675a55d.tar.bz2
uhd-188162a4dd59b47cf95d4be82e510faf9675a55d.zip
usrp: modified pps input tester to use double with real value for seconds
Diffstat (limited to 'host')
-rw-r--r--host/examples/test_pps_input.cpp10
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 {