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
6c388547
Commit
6c388547
authored
Feb 14, 2018
by
Andreas Schmidt
Browse files
Using X-Lap with CLOCK_MONOTONIC.
parent
dd8f32a9
Pipeline
#1923
failed with stages
in 1 minute
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
prrt/proto/processes/dataReceiver.c
View file @
6c388547
...
@@ -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_
REALTIME
,
packet_timestamp_ptr
);
clock_gettime
(
CLOCK_
MONOTONIC
,
packet_timestamp_ptr
);
}
}
*
packet_cyclestamp_ptr
=
__builtin_ia32_rdtsc
();
*
packet_cyclestamp_ptr
=
__builtin_ia32_rdtsc
();
}
}
...
...
prrt/proto/processes/dataTransmitter.c
View file @
6c388547
...
@@ -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_
REALTIME
,
packet_timestamp
);
clock_gettime
(
CLOCK_
MONOTONIC
,
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
);
}
}
...
...
xlap
@
116a01bd
Compare
00d0d00f
...
116a01bd
Subproject commit
00d0d00faaaa7b5a97d3db4de64a59be3d9bee5e
Subproject commit
116a01bd708b76d11124f6dd773d56bbecb93ebf
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