Fix bug #44 - [Request] IP log in the memory
This commit is contained in:
@@ -361,3 +361,10 @@ int split_string(const char* string, const char* split, struct linked_list* list
|
||||
return n;
|
||||
}
|
||||
|
||||
const char* get_timestamp(time_t now)
|
||||
{
|
||||
static char ts[32] = {0, };
|
||||
struct tm* t = localtime(&now);
|
||||
sprintf(ts, "[%02d:%02d]", t->tm_hour, t->tm_min);
|
||||
return ts;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user