#include "myfunc.h" time_t ltime(time_t *tloc) { struct timeval tp; struct timezone tz; /*gettimeofday(&tp);*/ gettimeofday(&tp,NULL); *tloc = (time_t)((tp.tv_sec * 1000) + ((tp.tv_usec + 100) / 1000)); return(*tloc); } void patternfill(void *p, int plen, u_char pat) { char *cp = (char *)p; do{ *cp = pat; cp++; }while(plen--); }