On Dienstag, 14. Juli 2015 19:00:14 CEST, Milian Wolff wrote:
On Tuesday, July 14, 2015 11:49:25 AM David Faure wrote:
On Friday 26 June 2015 18:03:00 Frank Reininghaus wrote: ...
It has. Querying the current time repeatedly is quite costly,
and often shows
up in code that extensively uses timers, or
QDateTime::currentDateTime() etc.
But it's probably still cheaper than querying on-disk meta data
in the worst
case, esp. on old rotary disks.
Actually, checking currentTime() is already the problem here (causing the IO for the
timezone stuff), see http://marc.info/?l=kde-core-devel&m=143533622526705&w=1
(the 1st paragraph part of my comment somehow turned into a second-level quote)
Comparing a monotic timer (QElapsedTime) is however - at least on linux - close to cost
free PLUS: one can have an entirely free "do not check again during this event
cycle" flag.
Cheers,
Thomas