Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LARN
PRRT
Commits
5b1f5b0c
Commit
5b1f5b0c
authored
Mar 14, 2018
by
Andreas Schmidt
Browse files
Reset clocks to CLOCK_REALTIME.
parent
a642858e
Pipeline
#2048
failed with stages
in 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
prrt/proto/processes/dataReceiver.c
View file @
5b1f5b0c
...
@@ -241,7 +241,7 @@ void receive_from_socket(PrrtSocket *socket_ptr, unsigned char buffer_ptr[65528]
...
@@ -241,7 +241,7 @@ void receive_from_socket(PrrtSocket *socket_ptr, unsigned char buffer_ptr[65528]
}
else
{
}
else
{
*
received_size
=
recvfrom
(
socket_ptr
->
dataSocketFd
,
buffer_ptr
,
MAX_PAYLOAD_LENGTH
,
0
,
*
received_size
=
recvfrom
(
socket_ptr
->
dataSocketFd
,
buffer_ptr
,
MAX_PAYLOAD_LENGTH
,
0
,
(
struct
sockaddr
*
)
remote_ptr
,
remote_len_ptr
);
(
struct
sockaddr
*
)
remote_ptr
,
remote_len_ptr
);
clock_gettime
(
CLOCK_
MONOTONIC
,
packet_timestamp_ptr
);
clock_gettime
(
CLOCK_
REALTIME
,
packet_timestamp_ptr
);
}
}
*
packet_cyclestamp_ptr
=
__builtin_ia32_rdtsc
();
*
packet_cyclestamp_ptr
=
__builtin_ia32_rdtsc
();
}
}
...
...
prrt/proto/processes/dataTransmitter.c
View file @
5b1f5b0c
...
@@ -60,7 +60,7 @@ bool send_to_socket(PrrtSocket* sock_ptr, PrrtReceiver *recv, uint8_t* buf, prrt
...
@@ -60,7 +60,7 @@ bool send_to_socket(PrrtSocket* sock_ptr, PrrtReceiver *recv, uint8_t* buf, prrt
// TODO: [LATENCY] By knowing the time encoding etc. that happens upfront, one could make an adjustment here.
// TODO: [LATENCY] By knowing the time encoding etc. that happens upfront, one could make an adjustment here.
check
(
sendto
(
sock_ptr
->
dataSocketFd
,
buf
,
length
,
0
,
recv
->
ai
->
ai_addr
,
recv
->
ai
->
ai_addrlen
)
==
check
(
sendto
(
sock_ptr
->
dataSocketFd
,
buf
,
length
,
0
,
recv
->
ai
->
ai_addr
,
recv
->
ai
->
ai_addrlen
)
==
length
,
"Sendto failed."
);
length
,
"Sendto failed."
);
clock_gettime
(
CLOCK_
MONOTONIC
,
packet_timestamp
);
clock_gettime
(
CLOCK_
REALTIME
,
packet_timestamp
);
*
packet_clockstamp
=
__builtin_ia32_rdtsc
();
*
packet_clockstamp
=
__builtin_ia32_rdtsc
();
debug
(
DEBUG_HARDSTAMPING
,
"Software TS:
\t
%ld.%09ld"
,
(
long
)
packet_timestamp
->
tv_sec
,
(
long
)
packet_timestamp
->
tv_nsec
);
debug
(
DEBUG_HARDSTAMPING
,
"Software TS:
\t
%ld.%09ld"
,
(
long
)
packet_timestamp
->
tv_sec
,
(
long
)
packet_timestamp
->
tv_nsec
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment