mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
Added CLOCK_MONOTONIC timestamp and thread id to Dprintf
This commit is contained in:
parent
6a47e20435
commit
6389c5fd90
1
HISTORY
1
HISTORY
@ -1,6 +1,7 @@
|
|||||||
VDR Plugin 'streamdev' Revision History
|
VDR Plugin 'streamdev' Revision History
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
|
- Added CLOCK_MONOTONIC timestamp and thread id to Dprintf
|
||||||
- Silenced warning (thanks to Rolf Ahrenberg)
|
- Silenced warning (thanks to Rolf Ahrenberg)
|
||||||
- Updated Finnish translation (thanks to Rolf Ahrenberg)
|
- Updated Finnish translation (thanks to Rolf Ahrenberg)
|
||||||
- Replaced server-side suspend modes with priority based precedence handling
|
- Replaced server-side suspend modes with priority based precedence handling
|
||||||
|
12
common.h
12
common.h
@ -17,10 +17,16 @@
|
|||||||
#include "tools/socket.h"
|
#include "tools/socket.h"
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
# include <stdio.h>
|
#include <stdio.h>
|
||||||
# define Dprintf(x...) fprintf(stderr, x)
|
#include <time.h>
|
||||||
|
#define Dprintf(fmt, x...) {\
|
||||||
|
struct timespec ts;\
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &ts);\
|
||||||
|
fprintf(stderr, "%ld.%.3ld [%d] "fmt,\
|
||||||
|
ts.tv_sec, ts.tv_nsec / 1000000, cThread::ThreadId(), ##x);\
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
# define Dprintf(x...)
|
#define Dprintf(x...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if APIVERSNUM >= 10714
|
#if APIVERSNUM >= 10714
|
||||||
|
Loading…
Reference in New Issue
Block a user