[Client] make_packet(): time to ms only once
This commit is contained in:
parent
94e3701a51
commit
fb8081f02e
|
@ -303,13 +303,14 @@ void make_packet()
|
|||
{
|
||||
uint_fast16_t offset ; // Index used to create the packet
|
||||
TIMESTAMP request_time ;
|
||||
uint_fast64_t request_time_ms ;
|
||||
|
||||
owl_timestamp_now(&request_time) ;
|
||||
request_time_ms = owl_timestamp_to_ms(request_time) ;
|
||||
|
||||
if (is_calibration_request) // Calibration packet
|
||||
{
|
||||
printf("Calibration time: %"PRIu64"\n",
|
||||
owl_timestamp_to_ms(request_time)) ;
|
||||
printf("Calibration time: %"PRIu64"\n", request_time_ms) ;
|
||||
|
||||
offset = 0 ;
|
||||
packet_size =
|
||||
|
@ -334,8 +335,7 @@ void make_packet()
|
|||
|
||||
else // Standard packet
|
||||
{
|
||||
printf("Request time: %"PRIu64"\n",
|
||||
owl_timestamp_to_ms(request_time)) ;
|
||||
printf("Request time: %"PRIu64"\n", request_time_ms) ;
|
||||
packet_size = sizeof(uint8_t) + sizeof(TIMESTAMP) ;
|
||||
packet = malloc(packet_size) ;
|
||||
memset(&packet[0], PACKET_TYPE_NORMAL, 1) ; // Packet type
|
||||
|
|
Loading…
Reference in New Issue