1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-05 05:56:46 +02:00

get unix time more efficiently

This commit is contained in:
Jfreegman
2014-03-13 23:56:46 -04:00
parent c2d417c78b
commit d29836845c
6 changed files with 35 additions and 19 deletions

View File

@ -346,6 +346,8 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
int x2, y2;
getmaxyx(self->window, y2, x2);
uint64_t cur_time = get_unix_time();
bool fix_statuses = x2 != self->x; /* true if window x axis has changed */
wattron(self->window, COLOR_PAIR(CYAN));
@ -454,15 +456,11 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
if (f_selected)
wattron(self->window, A_BOLD);
wprintw(self->window, "%s\n", friends[f].name);
wprintw(self->window, "%s", friends[f].name);
if (f_selected)
wattroff(self->window, A_BOLD);
// wprintw(self->window, "Last seen ");
// uint64_t last_seen = friends[f].last_online;
}
}
}