|
@@ -21,6 +21,7 @@
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
#include <stdio.h>
|
|
|
#include <string.h>
|
|
#include <string.h>
|
|
|
|
|
+#include <time.h>
|
|
|
#include <sys/times.h>
|
|
#include <sys/times.h>
|
|
|
|
|
|
|
|
#include <vcc/vcc.h>
|
|
#include <vcc/vcc.h>
|
|
@@ -91,10 +92,15 @@ struct theme *current_theme = &theme_def;
|
|
|
|
|
|
|
|
|
|
|
|
|
int pretty_new_msg(char *usrname, char *buf) {
|
|
int pretty_new_msg(char *usrname, char *buf) {
|
|
|
|
|
+ time_t time_now;
|
|
|
|
|
+ struct tm *tm_now;
|
|
|
|
|
+
|
|
|
ansi_csi_st(stdout, MODE_HIGHLIGHT, FG_BLACK, BG_BLACK);
|
|
ansi_csi_st(stdout, MODE_HIGHLIGHT, FG_BLACK, BG_BLACK);
|
|
|
|
|
|
|
|
setcolor(stdout, curr_time);
|
|
setcolor(stdout, curr_time);
|
|
|
- printf("\r[%ld] ", times(NULL));
|
|
|
|
|
|
|
+ time_now = time(NULL);
|
|
|
|
|
+ tm_now = localtime(&time_now);
|
|
|
|
|
+ printf("\r[%02d:%02d] ", tm_now->tm_hour, tm_now->tm_min);
|
|
|
|
|
|
|
|
if (unlikely(!strcmp(usrname, "system"))) {
|
|
if (unlikely(!strcmp(usrname, "system"))) {
|
|
|
setcolor(stdout, curr_sysusername);
|
|
setcolor(stdout, curr_sysusername);
|