mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
timestamp : Adjust hour print alignment format
This commit is contained in:
parent
65758f351b
commit
9f6a1d319d
1 changed files with 1 additions and 1 deletions
|
|
@ -647,7 +647,7 @@ int tty_connect(void)
|
||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
tm = localtime(&tv.tv_sec);
|
tm = localtime(&tv.tv_sec);
|
||||||
sprintf(current_str, "[%-2d:%02d:%02d.%03ld] ", tm->tm_hour, tm->tm_min, tm->tm_sec, tv.tv_usec/1000);
|
sprintf(current_str, "[%2d:%02d:%02d.%03ld] ", tm->tm_hour, tm->tm_min, tm->tm_sec, tv.tv_usec/1000);
|
||||||
fprintf(stdout, ANSI_COLOR_GRAY "%s" ANSI_COLOR_RESET, current_str);
|
fprintf(stdout, ANSI_COLOR_GRAY "%s" ANSI_COLOR_RESET, current_str);
|
||||||
next_timestamp = 0;
|
next_timestamp = 0;
|
||||||
if (option.log && option.timestamp)
|
if (option.log && option.timestamp)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue