Elapsed Timer (print elapsed time)
by Matt Caywood
20 Jul 2010
(Updated 05 Aug 2010)
Simple, useful utility for printing elapsed time and remaining time in a lengthy loop computation.
|
Watch this File
|
| File Information |
| Description |
A smarter version of the built-in functions tic and toc, made for iterative/loop computations.
Using it is just as simple:
etimer = elapsedtimer;
(then after each step)
steptimer(etimer);
After each step, prints out something like:
Elapsed time: 00:01:54 Time per step: 00:00:10 Time remaining: 00:00:25
To display time remaining, it needs to know the number of steps in the computation.
You can also set it to only print out every nth step, for example every 1000 steps. |
| MATLAB release |
MATLAB 7.8 (R2009a)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 30 Jul 2010 |
rewrote object-oriented & simplified |
| 05 Aug 2010 |
fixed major initialization bug |
|
Contact us