To find out how long it takes to open a small window, you might evaluate
the text shown in the following Workspace window:
For example, this might display 312, meaning that the code ran in 312 milliseconds (or .312 of a second).
If your code has several executable pieces and it takes more than, say, 15 seconds to run, use the method on smaller pieces of code. That is, divide up the code you are checking and determine the run time of individual pieces of code.