The class ProgressReport

This is nothing great, just one of my little helpers. It may take a lot of time to make a high resolution output image of say 6000×6000 pixels with anti-aliasing and cubic interpolation. Then we need some information on the computers progress as I mentioned in “fractals in high resolution“. To simplify this I built the class ProgressReport. You get its code in the next post.

The constructor takes as one argument an integer number e that defines the end of the task and a string, that will be printed in the reports. To begin a task we call the method “reset()”. Later we use “report(j)”, where j is an integer going from zero to e as the task progresses. Then we get every 2 seconds a message saying how much has been done and estimating the remaining time.

This entry was posted in programming and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s