Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Time jumps



Sergei Haller wrote:
> 
> On Tue, 24 Dec 2002, Klaus Schmidinger (KS) wrote:
> 
> KS> Sergei Haller wrote:
> KS> >
> KS> > ...
> KS> > but  while  we're  at  it:  what  is  the need need of `ptm' and `tm_r' in
> KS> > cMJD::SetSystemTime() ?
> KS>
> KS> Since localtime() is not thread safe we need to use localtime_r(), which
> KS> requires an extra 'struct tm' parameter. The 'ptm' in cMJD::SetSystemTime()
> KS> is actually superfluous, maybe it comes from copying these lines from somewhere
> KS> else...
> 
> but if 'ptm' isn't needed, localtime isn't needed either. and so 'tm_r'
> too. Or am I overseeing something? localtime has a side effect: it sets
> the variable 'tzname', so I suppose localtime_r does the same, but tzname
> isn't used either.

The call to localtime_r(&mjdtime, &tm_r) sets 'mjdtime', and that _is_ used.

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index