Backport unified client timer from proxy project.
This commit is contained in:
parent
5ad1a48489
commit
9975b4e4cd
13 changed files with 105 additions and 22 deletions
|
@ -57,15 +57,20 @@ protected:
|
|||
void onResultAccepted(Client *client, int64_t seq, uint32_t diff, uint64_t ms, const char *error) override;
|
||||
|
||||
private:
|
||||
void setJob(Client *client, const Job &job);
|
||||
constexpr static int kTickInterval = 1 * 1000;
|
||||
|
||||
void setJob(Client *client, const Job &job);
|
||||
void tick();
|
||||
|
||||
static void onTick(uv_timer_t *handle);
|
||||
|
||||
bool m_donateActive;
|
||||
char *m_agent;
|
||||
const Options *m_options;
|
||||
IStrategy *m_donate;
|
||||
IStrategy *m_strategy;
|
||||
uint64_t m_accepted;
|
||||
uint64_t m_rejected;
|
||||
uv_timer_t m_timer;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue