progress calculation in separate thread;
time is measured in milliseconds.