14 lines
385 B
C
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();
|
|
}
|