add print.h
This commit is contained in:
19
include/print.h
Normal file
19
include/print.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef PRINT_H
|
||||
#define PRINT_H
|
||||
|
||||
#define DEFRAWT() \
|
||||
time_t rawtime; \
|
||||
struct tm *timeinfo; \
|
||||
time(&rawtime); \
|
||||
timeinfo = localtime(&rawtime)
|
||||
|
||||
#define REDEFRAWT() \
|
||||
time(&rawtime); \
|
||||
timeinfo = localtime(&rawtime)
|
||||
|
||||
|
||||
#define PRINT_INFO(tminfo) \
|
||||
printf("\r\x1b[3m\x1b[38;5;8m[%02d:%02d]\x1b[0m \x1b[1m\x1b[34m-\x1b[0m!\x1b[34m-\x1b[0m ", tminfo->tm_hour, tminfo->tm_min)
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user