time: getter for SCTime_t timestamp of a thread

pull/12371/head
Victor Julien 11 months ago committed by Victor Julien
parent dbebd89de2
commit 677c0fd41c

@ -2247,6 +2247,14 @@ void TmThreadsInitThreadsTimestamp(const SCTime_t ts)
SCMutexUnlock(&thread_store_lock);
}
SCTime_t TmThreadsGetThreadTime(const int idx)
{
BUG_ON(idx == 0);
const int i = idx - 1;
Thread *t = &thread_store.threads[i];
return t->pktts;
}
void TmThreadsGetMinimalTimestamp(struct timeval *ts)
{
struct timeval local = { 0 };

@ -284,6 +284,7 @@ void TmThreadsInjectFlowById(Flow *f, const int id);
void TmThreadsInitThreadsTimestamp(const SCTime_t ts);
void TmThreadsSetThreadTimestamp(const int id, const SCTime_t ts);
void TmThreadsGetMinimalTimestamp(struct timeval *ts);
SCTime_t TmThreadsGetThreadTime(const int idx);
uint16_t TmThreadsGetWorkerThreadMax(void);
bool TmThreadsTimeSubsysIsReady(void);

Loading…
Cancel
Save