Remove alternate /sping implementation for systems without gettimeofday()
This changes the code to use struct timeval and get_time() on all systems, which simplifies the code by removing most of the checks for HAVE_GETTIMEOFDAY. The only user-visible change is that ancient systems without gettimeofday() will see message like "Server pong from irc.choopa.net 1.0000 seconds" instead of "Server pong from irc.choopa.net 1.x seconds". And really, I seriously doubt that there's any systems like that left out there anyway.
This commit is contained in:
@@ -50,11 +50,7 @@ typedef struct _queued_send
|
||||
typedef struct _sping_ {
|
||||
struct _sping_ *next;
|
||||
char *sname;
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
struct timeval in_sping;
|
||||
#else
|
||||
time_t in_sping;
|
||||
#endif
|
||||
} Sping;
|
||||
|
||||
|
||||
@@ -337,15 +333,6 @@ ChannelList *BX_get_server_channels (int);
|
||||
#endif
|
||||
int is_server_valid(char *name, int server);
|
||||
|
||||
#if 0
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
struct timeval get_server_sping (int);
|
||||
void set_server_sping (int, struct timeval);
|
||||
#else
|
||||
time_t get_server_sping (int);
|
||||
void set_server_sping (int, time_t);
|
||||
#endif
|
||||
#endif
|
||||
Sping *get_server_sping (int, char *);
|
||||
void clear_server_sping (int, char *);
|
||||
void set_server_sping (int, Sping *);
|
||||
|
||||
Reference in New Issue
Block a user