blob: 9a1cf1d9f2d4a16cf45e7eae3e765f1c5446b8fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#ifndef PROTECT_H
# define PROTECT_H
# define PROTECT_PING_INTERVAL_TIMEOUT 5000
# define PROTECT_SPEED_INTERVAL_TIMEOUT 40
# define PROTECT_SPEED_AVARAGE 10
# include "main.h"
# include "myTimer.h"
typedef struct protect_struct {
my_time_t lastPing;
my_time_t lastMove;
my_time_t avarage;
int count;
bool_t isDown;
} protect_t;
extern protect_t *newProtect();
extern void refreshLastMove(protect_t * p);
extern void rereshLastPing(protect_t * p);
extern bool_t isDown(protect_t * p);
extern void destroyProtect(protect_t * p);
#endif
|