i wanted show remaining time during installation in following question , used code there, posted tlama: how show percent done, elapsed time , estimated time progress?
the code working me, this. if install bigger files, period in "remaining-time-label" updated, fast.
so wanted ask, how change update period of "remaining-time-label", updates every second or every half second.
thanks in advance
use gettickcount
remember last update time. on next calls curinstallprogresschanged
calculate difference curtick
, update labels if difference large enough (1000 = 1 second)
var lastupdate: dword; procedure curinstallprogresschanged(curprogress, maxprogress: integer); var curtick: dword; begin curtick := gettickcount; if (curtick - lastupdate) >= 1000 begin lastupdate := curtick; // update labels end; end;
Comments
Post a Comment