Revision d8e83543 dbg.c

View differences:

dbg.c
8 8
#include <stdio.h>
9 9
#include <stdarg.h>
10 10

  
11
#include "dbg.h"
12

  
11 13
static struct timeval tnow;
12 14

  
13
int dtprintf2(const char *format, ...)
15
int ftprintf(FILE *stream, const char *format, ...)
14 16
{
15 17
  va_list ap;
16 18
  int ret;
17 19
  
18 20
  gettimeofday(&tnow, NULL);
19
  fprintf(stderr, "%ld.%03ld ", tnow.tv_sec, tnow.tv_usec/100);
21
  fprintf(stream, "%ld.%03ld ", tnow.tv_sec, tnow.tv_usec/1000);
20 22

  
21 23
  va_start (ap, format);
22 24
  ret = vfprintf(stderr, format, ap);

Also available in: Unified diff