> On June 5, 2013, 10:35 p.m., David Gil Oliva wrote: > > kio/kio/slavebase.cpp, line 275 > > <http://git.reviewboard.kde.org/r/110836/diff/1/?file=148651#file148651line275> > > > > AFAIK, time_t can be either a given moment in time (say 2013-06-06, > > 00:00) or an elapsed time (say 136 seconds). > > > > On the other hand, QDateTime can only be a given moment in time. That's > > why I try to transform the time_t of elapsed time to integers and work with > > seconds. > > > > I'll try to stick with QDateTime and compute the timeouts using other > > means.
Well time_t is always an elapsed time, but usually since the epoch (1970) :-) But yeah, I know what you mean, it can also be used as an elapsed time since some other starting time. But I don't get it. From the calculation above (d->timeout - time(0)) I conclude that d->timeout is actually an absolute time (i.e. since the epoch). Otherwise this substraction makes no sense at all. So surely QDateTime::msecsTo() would be fine here? The name "timeout" is just very very confusing in the existing code, that's for sure. It's not a duration AFAICS, it's the absolute time at which we'll "get a timeout". - David ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/110836/#review33834 ----------------------------------------------------------- On June 5, 2013, 11:19 a.m., David Gil Oliva wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/110836/ > ----------------------------------------------------------- > > (Updated June 5, 2013, 11:19 a.m.) > > > Review request for KDE Frameworks. > > > Description > ------- > > Port time_t to QDateTime in SlaveBase (KIO) > > > Diffs > ----- > > kio/kio/slavebase.cpp e5333cfff24d0fdb3eb7f123413e8fb80e504d37 > > Diff: http://git.reviewboard.kde.org/r/110836/diff/ > > > Testing > ------- > > It builds. > > > Thanks, > > David Gil Oliva > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel