This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
stellar-stellar/src/session/session_timer.h

29 lines
819 B
C
Raw Normal View History

2023-12-12 18:41:53 +08:00
#ifndef _SESSION_TIMER_H
#define _SESSION_TIMER_H
#ifdef __cpluscplus
extern "C"
{
#endif
#include "session.h"
struct session_timer;
struct session_timer *session_timer_create();
void session_timer_destroy(struct session_timer *timer);
void session_timer_add_session(struct session_timer *timer, struct session *sess);
void session_timer_del_session(struct session_timer *timer, struct session *sess);
/*
* return one session which timeout, or NULL if no session timeout.
* if return session, the session will be removed from timer.
*/
struct session *session_timer_expire_session(struct session_timer *timer, uint64_t abs_current_ts);
// return interval to next required update, return 0 if no timer
uint64_t session_timer_next_expire_interval(struct session_timer *timer);
2023-12-12 18:41:53 +08:00
#ifdef __cpluscplus
}
#endif
#endif