Fixed bug in rx_callback(), where time_stamp.tv_usec was sent through modulo before time_stamp.tv_sec was updated.
This commit is contained in:
@ -252,8 +252,8 @@ int rx_callback(hackrf_transfer* transfer) {
|
||||
(uint64_t)(num_samples + THROWAWAY_BLOCKS * SAMPLES_PER_BLOCK)
|
||||
* j * FREQ_ONE_MHZ / DEFAULT_SAMPLE_RATE_HZ;
|
||||
if(999999 < time_stamp.tv_usec) {
|
||||
time_stamp.tv_usec = time_stamp.tv_usec % 1000000;
|
||||
time_stamp.tv_sec += time_stamp.tv_usec / 1000000;
|
||||
time_stamp.tv_usec = time_stamp.tv_usec % 1000000;
|
||||
}
|
||||
}
|
||||
if(do_exit) {
|
||||
|
Reference in New Issue
Block a user