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

@ -751,7 +751,7 @@ static bool setup_myself(void) {
myself->nexthop = myself;
myself->via = myself;
myself->status.reachable = true;
myself->last_state_change = time(NULL);
myself->last_state_change = now.tv_sec;
myself->status.sptps = experimental;
node_add(myself);
@ -958,7 +958,7 @@ static bool setup_myself(void) {
return false;
}
last_config_check = time(NULL);
last_config_check = now.tv_sec;
return true;
}