stellar support monotonic time and real time
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
#include <pthread.h>
|
||||
#include <sys/prctl.h>
|
||||
|
||||
#include "times.h"
|
||||
#include "config.h"
|
||||
#include "timestamp.h"
|
||||
#include "stellar_priv.h"
|
||||
|
||||
struct stellar_runtime __runtime = {0};
|
||||
@@ -122,7 +122,7 @@ static void *work_thread(void *arg)
|
||||
|
||||
while (ATOMIC_READ(&runtime->need_exit) == 0)
|
||||
{
|
||||
now = timestamp_get_msec();
|
||||
now = stellar_get_monotonic_time_msec();
|
||||
memset(packets, 0, sizeof(packets));
|
||||
nr_recv = packet_io_ingress(packet_io, thr_idx, packets, RX_BURST_MAX);
|
||||
if (nr_recv == 0)
|
||||
@@ -247,7 +247,7 @@ void stellar_set_current_thread_index(uint16_t idx)
|
||||
|
||||
int stellar_thread_init(struct stellar_runtime *runtime, struct stellar_config *config)
|
||||
{
|
||||
uint64_t now = timestamp_get_msec();
|
||||
uint64_t now = stellar_get_monotonic_time_msec();
|
||||
for (uint16_t i = 0; i < config->io_opts.nr_threads; i++)
|
||||
{
|
||||
struct stellar_thread *thread = &runtime->threads[i];
|
||||
|
||||
Reference in New Issue
Block a user