masters-thesis/listings/send_time.c
Dennis af25b4b828 Initial commit of master's thesis
This is the version I submitted to RWTH Aachen University at November 9,
2018.
2018-11-12 12:56:59 +01:00

14 lines
385 B
C

// `int messages' represents the number of messages to be sent
struct timespec tp[messages];
for (int i = 0; i < messages; i++) {
/**
* Prepare WR with an sge that points to tv_nsec of tp[i].
* By using an array of timespecs, it is guaranteed that
* the timestamp will not be overwritten.
*/
clock_gettime(CLOCK_MONOTONIC, &tp[i]);
ibv_post_send();
}