diff include/freeDiameter/libfreeDiameter.h @ 22:0b3b46da2c12

Progress on server code
author Sebastien Decugis <sdecugis@nict.go.jp>
date Mon, 19 Oct 2009 18:43:09 +0900
parents 277ec00d793e
children db6c40b8b307
line wrap: on
line diff
--- a/include/freeDiameter/libfreeDiameter.h	Thu Oct 08 20:05:16 2009 +0900
+++ b/include/freeDiameter/libfreeDiameter.h	Mon Oct 19 18:43:09 2009 +0900
@@ -119,16 +119,17 @@
  * FUNCTION:	fd_log_time
  *
  * PARAMETERS:
+ *  ts	 	: The timestamp to log, or NULL for "now"
  *  buf 	: An array where the time must be stored
  *  len		: size of the buffer
  *
  * DESCRIPTION: 
- *  Writes the current timestamp (in human readable format) in a buffer. 
+ *  Writes the timestamp (in human readable format) in a buffer. 
  *
  * RETURN VALUE:
  *  pointer to buf.
  */
-char * fd_log_time ( char * buf, size_t len );
+char * fd_log_time ( struct timespec * ts, char * buf, size_t len );
 
 
 /* levels definitions */
@@ -172,7 +173,7 @@
 		char * __thn = ((char *)pthread_getspecific(fd_log_thname) ?: "unnamed");					\
 		fd_log_debug("\t | tid:%-20s\t%s\tin %s@%s:%d\n"								\
 			  "\t%s|%*s" format "\n",  										\
-					__thn, fd_log_time(__buf, sizeof(__buf)), __PRETTY_FUNCTION__, __FILE__, __LINE__,	\
+					__thn, fd_log_time(NULL, __buf, sizeof(__buf)), __PRETTY_FUNCTION__, __FILE__, __LINE__,	\
 					(level < FULL)?"@":" ",level, "", ## args); 						\
 	}															\
 }
"Welcome to our mercurial repository"