|
|
||||||||||||||||||||||
ETIME: Keep track of elapsed timeIf you want to use etime, then feel free to use Stata's command ssc install to download and install etime:ssc install etime , replaceDisclaimer: There is no warranty on this software either expressed or implied. This program is released under the terms and conditions of GNU General Public License. About etime
Programmer: Dan Blanchette ()
Center for Entrepreneurship and Innovation Duke University's Fuqua School of Business Durham, NC USA Developed at The Carolina Population Center at The University of North Carolina at Chapel Hill Date: 30Sep2003 Last updated: 09Jul2008 Time how long a program runs; or, simply, keep track of the elapsed time from point A to point B in a program
etime [ , start datestart(start date)
timestart(start time)]
Description
etime is designed for programmers who want to keep track of how long a program takes to run.
Using Stata's creturn macro variables:
c(current_date) and c(current_time), etime clocks the difference in time between calls. Like a stopwatch, etime needs to be started and stopped. The second and following times etime is submitted it displays a message that says how long it has been since the first time etime was submitted (in the current Stata session). Options
start specifies to set or reset etime. Not specifying start is equivalent to
ending or simply checking the elapsed time.
Options datestart() and timestart() need to be used when timing a command that runs etime.
datestart specifies to etime to use this start date. The date must be in the
%dD_m_cy format like: 10 Jul 2008 which is the format of
c(current_date). If you specify a
start date you also have to specify time.
timestart specifies to etime to use this start time. The time must be in
hr:min:sec format like: 14:20:58 which is the format of
c(current_time). If you specify a
start time but not the start date, the current date will be used.
Remarks
etime creates global macros $etime_stardate_ and $etime_startime_ .
Examples. etime, start . etimeDisplays: Elapsed time is 2 hours 27 minutes 3 seconds . local date `c(current_date)' . local time `c(current_time)' . etime, d(`date') t(`time') . etime, d(10 Jul 2008) t(03:48:14) Saved Results
The etime command saves in s():
Also seeBack to Main Page Questions or comments? Send them to Dan Blanchette () |
|||||||||||||||||||||||