mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 19:01:13 +02:00
sectionsd: unify and optimize debug messages
Origin commit data
------------------
Commit: f5346d9f91
Author: limes007 <39467727+limes007@users.noreply.github.com>
Date: 2019-02-23 (Sat, 23 Feb 2019)
This commit is contained in:
@@ -26,14 +26,14 @@
|
||||
#include <sys/time.h>
|
||||
#include "debug.h"
|
||||
|
||||
bool sections_debug;
|
||||
int sections_debug = DEBUG_NORMAL;
|
||||
|
||||
void printdate_ms(FILE *f) {
|
||||
timeval now;
|
||||
gettimeofday(&now, NULL);
|
||||
struct tm *tm = localtime(&now.tv_sec);
|
||||
/* use strftime for that? */
|
||||
fprintf(f, "%02d:%02d:%02d.%03ld ", tm->tm_hour, tm->tm_min, tm->tm_sec, now.tv_usec/1000);
|
||||
fprintf(f, "%04d-%02d-%02d %02d:%02d:%02d.%03ld ", tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, now.tv_usec/1000);
|
||||
}
|
||||
|
||||
static int64_t last_profile_call;
|
||||
|
Reference in New Issue
Block a user