New topic: Timing an Application.
<http://forums.realsoftware.com/viewtopic.php?t=47758> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message Luis Post subject: Timing an Application.Posted: Wed May 01, 2013 10:43 pm Joined: Wed Oct 08, 2008 6:55 pm Posts: 19 Location: Eden Prairie, MN, USA Hello, Is it possible to time the elapsed time of an application from start to finish? Pseudocode: Start counting time in seconds or milliseconds Execute Application Stop counting time Display time difference I looked for "execution time", "timing an application" and so on in this forum but could not find the right posting. I think that "seconds" will be a large unit so maybe milliseconds or microseconds will be more suitable. Any guidance or posting that you know of will help. Thank you in advance. Luis. Top npalardy Post subject: Re: Timing an Application.Posted: Wed May 01, 2013 10:55 pm Real Software Engineer Joined: Sat Dec 24, 2005 8:18 pm Posts: 7802 Location: Canada, Alberta, Near Red Deer Use the profiler if you have it ? Other than that 1) create a new class ProfileTimer 2) add a property to the class dim startTime as date 3) add a constructor to the class startTime = new Date 4) add a destructor to this class in there you can write out the current time - the start time saved earlier dim current as new date system.debuglog format(current.totalseconds - startTime.totalSeconds, "#00.000000") 5) add a property to the app instance p as ProfileTimer 6) in app.open do something like p = new ProfileTimer when the class instance is finally destroyed (at the end of the app) you can write out or log the total time _________________ Norman Palardy (Real Software) Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
