This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: once more "gettimeofday"
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: WYSIWYH at web dot de
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 18 Jan 2002 12:46:51 +0100
- Subject: Re: [ECOS] once more "gettimeofday"
- References: <200201181140.g0IBeSC25025@mailgate5.cinetic.de>
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