Revision 1 (by moose, 2006/07/06 01:31:16) Initial import
#include <time.h>
#include <stdio.h>
#include <sys/time.h>

#define log(a, b...) do{\
   char __tmp__[2048]; \
   snprintf(__tmp__, 2048, a,##b); \
   fprintf(stderr, "%i:%s:%s: %s\n", __LINE__, __FUNCTION__, __FILE__, __tmp__); \
} while(0)

int main(int argc, char **argv)
{
	struct timeval tm;

	while(1) {
		gettimeofday(&tm, NULL);
		log("sec: %ui, usec: %ui", tm.tv_sec, tm.tv_usec);
	}

	return 0;
}