view osdep/gettimeofday.c @ 21592:ae0f4c4e4d9d

__CPU__ will be x86-64 under amd64 and fail the check "#if __CPU__ > 386". patch by Zuxy Meng, zuxy.meng gmail com
author diego
date Wed, 13 Dec 2006 11:23:15 +0000
parents 08cac43f1e38
children 936209c39ed1
line wrap: on
line source

#include "config.h"

#ifndef HAVE_GETTIMEOFDAY
#include <sys/time.h>
#include <sys/timeb.h>
void gettimeofday(struct timeval* t,void* timezone)
{       struct timeb timebuffer;
        ftime( &timebuffer );
        t->tv_sec=timebuffer.time;
        t->tv_usec=1000*timebuffer.millitm;
}
#endif