Moved cons_about() to console module

This commit is contained in:
James Booth
2013-04-20 23:39:17 +01:00
parent 3e66b0a9d2
commit c7100203e4
8 changed files with 404 additions and 382 deletions

View File

@@ -64,3 +64,15 @@ window_free(ProfWin* window)
free(window);
window = NULL;
}
void
window_show_time(ProfWin* window, char show_char)
{
GDateTime *time = g_date_time_new_now_local();
gchar *date_fmt = g_date_time_format(time, "%H:%M:%S");
wattron(window->win, COLOUR_TIME);
wprintw(window->win, "%s %c ", date_fmt, show_char);
wattroff(window->win, COLOUR_TIME);
g_date_time_unref(time);
g_free(date_fmt);
}