This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: once more "gettimeofday"


On Fri, Jan 18, 2002 at 12:40:28PM +0100, WYSIWYH@web.de wrote:
> Hi,
> once more an "stupid" question:
> Now I'm using the gettimeofday function from snmp and it gave me the
> right seconds back (from 1970) but not the useconds. And when I delay
> the system for a short time: in every case the function brings me back the correct seconds but not the useconds (always zero)- why?

from system.c:

int gettimeofday(struct timeval *tv,
                 struct timezone *tz)
{
 
    tv->tv_usec = 0;
    tv->tv_sec = time(NULL);
    return(0);
}

        Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]