[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] MiNTlib timing related functions behavior/performance
Hi,
On keskiviikko 17 huhtikuu 2013, Andreas Schwab wrote:
> Eero Tamminen <oak@helsinkinet.fi> writes:
> > However, gettimeofday():
> > * uses Tgettimeofday() on MiNT and Tgettime() & Tgetdate() on TOS.
> > * Then it does mktime() which does timezone stuff, and if non-null
> > value is given as timezone arg (like Quake does), it will also
> > call timezone stuff directly.
...
> But mintlib should not be calling the localtime stuff for the timezone,
> this is meant to be the _kernel_'s idea of the timezone. If MiNT does
> not keep track of a time zone gettimeofday should just return zero in
> the timezone argument.
Has somebody looked into this timezone stuff?
gettimeofday() being unreasonably slow in MiNTlib is pretty nasty.
E.g. Linux has kernel fast path for gettimeofday() because it's
called so often:
http://man7.org/linux/man-pages/man7/vdso.7.html
- Eero