Avoid calling time(NULL).

In most cases we can use the cached time.
This commit is contained in:
Guus Sliepen 2013-03-08 14:11:15 +01:00
parent af77e5d475
commit 4c30004cb6
11 changed files with 18 additions and 17 deletions

View file

@ -160,7 +160,7 @@ bool id_h(connection_t *c, const char *request) {
if(name[0] == '^' && !strcmp(name + 1, controlcookie)) {
c->status.control = true;
c->allow_request = CONTROL;
c->last_ping_time = time(NULL) + 3600;
c->last_ping_time = now.tv_sec + 3600;
free(c->name);
c->name = xstrdup("<control>");