Hello Jawad,
The UHD 3.9 release changed the default GPSDO behavior. UHD does not automatically synchronize device time to GPS time on initialization because it's not reliable during device start-up. I'm not 100% sure about GNU Radio's handling of these changes so will have to check before commenting on the behavior there.
Here is a method of reliably setting the time in your own code:
1) Poll on usrp->get_mboard_sensor("gps_locked") until it returns true
2) Poll on usrp->get_time_last_pps() until a change is seen.
3) Sleep 200ms (allow NMEA string to propagate)
4) Use "usrp->set_time_next_pps(uhd::time_spec_t(usrp->get_mboard_sensor("gps_time").to_int()+1));" to set the time
5) Poll on usrp->get_time_last_pps() until a change is seen.
6) Sleep 200ms (allow NMEA string to propagate)
7) Verify that usrp->get_time_last_pps() and usrp->get_mboard_sensor("gps_time") return the same time.
Regards,