mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-07 03:57:07 +03:00
pretty things up a bit
This commit is contained in:
@@ -69,7 +69,11 @@ const char *logtime(void) {
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
strftime(buf, sizeof(buf), "[%T.", localtime(&tv.tv_sec));
|
||||
sprintf(buf+strlen(buf), "%06ld]", (long)tv.tv_usec);
|
||||
#ifdef EMBEDDED
|
||||
sprintf(buf+strlen(buf), "%03ld]", (long)tv.tv_usec/1000);
|
||||
#else
|
||||
sprintf(buf+strlen(buf), "%06ld]", (long)tv.tv_usec);
|
||||
#endif
|
||||
#endif
|
||||
return buf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user