f



Get a timing in milliseconds

Hi,
Is there a way to time the execution of a process in milliseconds
with GT.M ?
Kind of like:
new m1, m2
set m1 = $$timeInMillisecondsNow
;... processing
set m2 = $$timieInMillisecondsNow
new r
set r=m2-m1
write "it took ",r," millisecs to complete.",!

Thanks.
SR
0
sglrigaud (91)
1/26/2008 12:06:49 PM
comp.lang.mumps 1621 articles. 0 followers. Post Follow

2 Replies
440 Views

Similar Articles

[PageSpeed] 28

hi,

S�bastien de Mapias wrote:

> Is there a way to time the execution of a process in milliseconds
> with GT.M ?
> Kind of like:
> new m1, m2
> set m1 = $$timeInMillisecondsNow
> ;... processing
> set m2 = $$timieInMillisecondsNow
> new r
> set r=m2-m1
> write "it took ",r," millisecs to complete.",!

if there is no $$timeInMillisecons function in GT.M
(I don't know GT.M) then you can do a workaround with a loop:

proctime
	set count=1000
	; or 10000 or 1000000 or ... depends on the your process

	; get overhead time
	set time1=$p($h,",",2)
	for i=1:1:count do dummy
	
	; get process+overhead time
	set time2=$p($h,",",2)
	for i=1:1:count do process
	set time3=$p($h,",",2)
	
	; compute process time
	write "process time: ",-2*time2+time1+time3/count," sec/proc",!
	quit

dummy	quit

process
	...
	...
	quit

hth and
have a nice day
julius

-- 
///
0
kavay (27)
1/27/2008 1:30:26 AM
This discussion is being continued on Source Forge - see
http://sourceforge.net/forum/message.php?msg_id=4744463

Regards
-- Bhaskar
ks dot bhaskar at fnis dot com <-- send e-mail here
0
ksbhaskar (327)
1/27/2008 4:52:36 PM
Reply:

Similar Artilces:

Getting millisecond-precision time out of a Time object?
Is there any way to get a millisecond-precision time (hh:mm:ss.sss) out of a Time object? Time class's toString() method only returns the time at one-second precision (hh:mm:ss), which is not accurate enough for my purposes. -- -Aki "Sus" Laukkanen On Wed, 03 Nov 2004 17:48:21 +0200, Aki "Sus" Laukkanen wrote: > Is there any way to get a millisecond-precision time (hh:mm:ss.sss) > out of a Time object? ...errr. Are you referring to java.sql.Time? It's super-class, java.util.Date, has getTime() that provides msec. HTH -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane > which is not accurate enough for my purposes. I don't know how deep you want to go into precision, but just a hint: Windows system time quant is 50ms, this is the smallest quant you can get any *real* results. Below that you are getting the bogus = (myTime mod 50) + a spice from the floating part of the number (to do not show all zeros at the end every time). I don't know about the quant on Unix and Mac, but is also *definitely* not 1ms and of course not 1ns (And I saw some guys seriously extending default stuff to work with picosecs, which is really... sad). On Wed, 3 Nov 2004 18:09:56 +0100, VK wrote: > (And I saw some guys seriously extending default stuff to work ...

time in milliseconds by calling time.time()
I am trying to measure some system response time by using the time.time () or time.clock() in my script. However, the numbers I get are in 10s of milliseconds. For example, 1248481670.34 #from time.time() 0.08 #from time.clock() That won't work for me, since the response time may be only a few milliseconds. My environment is Solaris 10 with Python 2.4.4 (#7, Feb 9 2007, 22:10:21). SunOS 5.10 Generic_137112-07 i86pc i386 i86pc The tricky thing is, if I run the python interpreter and import the time module, I can get a time floating number in better precision by cal...

Getting current time in milliseconds
Hi, I'm on a Mac OS 10.5.6 with Perl 5.8.8. From a shell script (/bin/ sh), do you know how I could use perl to get the current time in milliseconds (or microseconds) and store the value in a shell variable? Thanks, - Dave In article <c117c8d9-0749-4552-8e26-5188353a1c0b@o9g2000prg.googlegroups.com>, laredotornado <laredotornado@zipmail.com> wrote: > Hi, > > I'm on a Mac OS 10.5.6 with Perl 5.8.8. From a shell script (/bin/ > sh), do you know how I could use perl to get the current time in > milliseconds (or microseconds) and store the value in a shell...

getting elapsed time in milliseconds
Hi there, I need to know how to get the elapsed time in milliseconds. I tried time_t start,end; time(start); do_something(); time(end); double dif = difftime(end, start); but this only returns the elapsed time in seconds. So how can I get it in milliseconds? Thanks for hlep Thomas Thomas Baier wrote: > I need to know how to get the elapsed time in milliseconds. I tried [SNIP] > So how can I get it in milliseconds? By a high resolution timer facility provided by your operating system, if it provides one. Not possible to do only usin...

getting elapsed time with accuracy in milliseconds
I've a requirement to find the elapsed time between two function calls. I need to find the time elapsed accurate to 1 millisecond. The problem I'm facing right now is that, I'm using the 'time()' function call for the purpose and regardless of how many time I invoke the function within my program, I get the same output!!! For better clarity consider the code snippet below. [code] ... start_time = time(NULL); ... ... ... printf(" - time elapsed: %li.\n", time(NULL) - start_time); // the above statement always returns the value 0...

timing response times in milliseconds
I'm using an access xp form to present stimuli which participants in an experiment must respond to as quickly as they can. I need to time their responses as accurately as possible. At the moment I have a timer with interval set to 1 and increment a variable by 1 each timer event then compare the time of presentation with the time of the keypress. However this is very inaccurate bacuse the timer event doesn't actually happen this often, it seems to me to be quite irregular and unless I set the interval to something much slower (e.g. 500 ms) it doesn't seem to be able to keep up. It's crucial that I can accuratly measure response times to at least 10 ms. Thanks Sha x Don't use a timer at all. Instead use a module level variable to hold the time when the stimuli is presented. The difference between that and the time of the response event would give the response interval. - Jim On 31 May 2004 04:19:34 -0700, sha_crawford@hotmail.com (Sha Crawford) wrote: >I'm using an access xp form to present stimuli which participants in >an experiment must respond to as quickly as they can. I need to time >their responses as accurately as possible. At the moment I have a >timer with interval set to 1 and increment a variable by 1 each timer >event then compare the time of presentation with the time of the >keypress. However this is very inaccurate bacuse the timer event >doesn't actually happen this often, it seems to me to be quite >irre...

time manipulation getting invalid times
I have a script that deals with time in hours, minures, seconds and milliconds. Initially I was using the round function from Math::Round It was working fine then I noticed I was getting an error occasionaly. Turned out it was when the seconds were 59 and the milliseconds were above 500, I was rounding the minutes from 59 to 60 yeilding invalid times like 13 minutes and 60 seconds instead of 14 minutes and 00 seconds. Example: HH:MM:SS,miliseconds $lines[0] = 00:13:59,934 my $roundedSeconds = sprintf("%02d",(round(substr($lines[0],-6)))); Using the round function from Math...

How do I get time in another time zone ??
I'm in the UK using British Summer Time (BST). I'd like to get the time in New York (EDT). I believe there is an option to 'clock' to change the time zone, but any combination I try gives the wrong result. This is what I have: set foobar [clock format [clock seconds]] Ideally, I'd like to get the time in this format: Sun Oct 19 17:38:07 EDT (New York time) I can obviously add '(New York time)'. Any suggestions how I can get the time in the EDT timezone, and ideally in the format shown. dave Dave wrote: > I'm in the UK using British Summer Time (BST). I'd like to get the time > in New York (EDT). I believe there is an option to 'clock' to change the > time zone, but any combination I try gives the wrong result. You most likely want something like: clock format [clock seconds] -format "%x %X %Z" \ -timezone :America/New_York -locale en_US You'll notice that -locale deals with punctuation differences (and details like month-first vs. day-of-month-first), while -timezone deals specifically with time zone. -locale and -timezone need Tcl 8.5 or later. If you're stuck on 8.4, you can either play games with $env(TZ) or get the 'newclock' extension. -- 73 de ke9tv/2, Kevin ...

using time.gov to get the current time
Is there any way to get the current time from time.gov using urllib2 or som= ething similar? Does anyone have any examples of doing this? Thanks! Rick King Southfield MI ...

How to get simulink simulation time to be the same as actual time.
Hello everyone, I am using trying to use simulink as a controller for an experiment using a data acquisition board to read in instrument signals and send out command signals real time. I am having a few issues and I believe that all of these could be resolved if I could just get the simulation time to be real time. What I mean is that if I use a fixed time step of .01 seconds and have a simulation time of 10 seconds then I want the simulation to last 10 seconds and have a delay of .01 seconds between each time step. Is there a way to do this or is there a tutorial I should read for how t...

Get the date time from Oracle date time stamp?????
I am using crystal reports to attempt to extract information from this database but I need to know which records were last updated. I have managed to find a field in Oracle and its value is based on a trigger function as shown below begin select TIMESTAMP_SEQ.nextval into :new.NURS_TIMESTAMP from dual; end; This at 9.45am (UK) on 05/09/2003 generated a value of 5,048,868 My main expertise is in SQL Server, my question is can I reverse engineer this value to calculate the time? Or is it like an identity field in SQL server (i.e. An automatic incremental counter) I would really appreciate any help or pointers to some good web sources. Ric wrote: > I am using crystal reports to attempt to extract information from this > database but I need to know which records were last updated. I have > managed to find a field in Oracle and its value is based on a trigger > function as shown below > > begin > > select TIMESTAMP_SEQ.nextval into :new.NURS_TIMESTAMP from dual; > > end; > > This at 9.45am (UK) on 05/09/2003 generated a value of 5,048,868 > > My main expertise is in SQL Server, my question is can I reverse > engineer this value to calculate the time? Or is it like an identity > field in SQL server (i.e. An automatic incremental counter) > > I would really appreciate any help or pointers to some good web > sources. Oracle dates are always WITH time! The ...

Where does he get the time!!!!???
I mean with all those iPad repairs! https://groups.google.com/forum/#!search/Alan$20Baker In article <l5tacq$h86$1@dont-email.me>, Jaybird <jbird@frontiernet.net> wrote: > I mean with all those iPad repairs! > > https://groups.google.com/forum/#!search/Alan$20Baker First Last Sock puppet Email : Posts 08/28/12 08/28/12 : Alpac albertpac@aol.com : 2 08/30/12 09/11/12 : Jack Spratley jackspratley@gmail.com : 135 09/07/12 12/31/12 : Michael mikepat@aol.com : 24 09/12/12 09/12/12 : The Hornster H.ornes8008@AOL.COM : 1 09/13/12 09/13/12 : Dom domv6342@yahoo.con : 1 09/14/12 09/20/12 : FDK fdk@yahoo.com : 76 09/20/12 12/09/12 : FDK fdk@aol.com : 596 10/03/12 10/03/12 : Alpac Alpacker@gmail.com : 3 10/09/12 Jul 16 : zara zaraspook@heddon.com : 14 11/22/12 11/22/12 : Connor connerT@gmail.com : 1 11/24/12 11/26/12 : Geof gbarnes@yahoo.com : 9 11/27/12 12/11/12 : Mocassin Joe joemocasanto@aol.com : 4 11/27/12 12/01/12 : K. Kaiser Kkaiser@gmail.com : 12 12/13/12 12/22/12 : Mamma Dong barney@moestavern.com : 2 12/15/12 12/22/12 : Michael Mikepat@aol.com : 68 Jan 10 Mar 17 : Rollo rogerl@gmail.com ...

how to get wallclock time between any two events (not simulation time ) in vhdl
The problem is that i want to know how much real time has elapsed between two events that have occured . for eg; if an assignment a<= 0 occurs at simulation time =0s and real time = 0s and the assignment a<= 1fs occurs at simulation time = 1s and real time = 1 day (just say the processor is very slow) so i want to get the answer 1 day and not 1fs one option that i thought was of writing a file at both the points and thereby getting 2 files with different time stamp but it is very crude method and would consume lot of space if i want to do recursively I am using modelsim so any such ...

how do i get time
how do i get the date? i know that today is 4/1/2008 by using the get date/time function..but how do i make a string for 4make a string for 1make a string for 2008 try this: <a href="http://zone.ni.com/reference/en-XX/help/371361D-01/glang/format_date_time_string/" target="_blank">http://zone.ni.com/reference/en-XX/help/371361D-01/glang/format_date_time_string/</a> &nbsp; yeah..that was my first try.. %m = 04%d = 01%y = 08can i get 2008 instead of 08?anyway to do that? got it..use %Y instead of %ythank you for the quick response!Message Edited by krispiekream on 04-01-2008 08:07 PM ...

How come I get in textbox long time, while set to short time
How come I get the time in hrs/min/sec while the with the mask input wizard I get 00:00;0;_ as mask. Other similar textboxes give the right input (hrs/min) With mask 00:00 only no other effect. Also in the table properties the field is set to Short Time. Bart An "Input Mask" is used to structure input, not to format display... the Format property of the Textbox should be set to the format you want. Masks seem "quirky" to many users, and I avoid them when possible; my users would rather get an error message and an opportunity to correct, than to have their cursor set in the middle of the mask if they don't click on the very rightmost part of the box. Larry Linson Microsoft Office Access MVP "AA Arens" <bartvandongen@gmail.com> wrote in message news:f93a58ae-8354-4f09-913b-dd00e3e8850b@d15g2000prc.googlegroups.com... > How come I get the time in hrs/min/sec while the with the mask input > wizard I get 00:00;0;_ as mask. Other similar textboxes give the right > input (hrs/min) > > With mask 00:00 only no other effect. > > Also in the table properties the field is set to Short Time. > > Bart ...

TMW: it is time to get more aggressive with spammers; it is time for spam crusaders!
like most CSSM visitors of TMW&#8217;s web engine, i am very frustrated, not only with the again revived onslaught of spam by extremely spiteful individuals - who seem to have a valid TMW account, to boot - but even more so with the still toothless instrument of the new news engine to fight it why continue to tip-toe around those malignant critters?! i strongly suggest that something along this line be implemented quickly(!) - we all know that there are many friendly, good natured, and seasoned CSSM/FEX citizens who&#8217;ve been around regularly for a long time with a well known re...

Hello, does anyone get a hard time when running mathematica and matlab at the same time on the same PC?
HI, all, whenever I run the two programs, my laptop will stop response and have to be restarted, which reflects the two math programs are competing for the resources. Is it true or just my illusion? If so, any solution for it, or just run one program at one time? Thanks, Jing why would you want to? Probably Matlab becomes angry (he is a bit jealous...) Try to close mathematica windows. sunnylele wrote: > > > HI, all, > whenever I run the two programs, my laptop will stop response and > have > to be restarted, which reflects the two math programs are competing > for &...

How application get precise time from Win NT/XP system time that synchronies to NTP
Hi, My applications is to do time stamp that need 10 microsecond accuracy. Many PCs in network environment will need ssme precise time stamp. One way to do it is to install Trimble Acutime GPS for each PC. Because of cost consideration, I installed a Win NT NTP server that use Trimble Acutime GPS as reference clock and the rest of PCs synchronize to the server and I try to find a way to get precise time from NT/ XP system. I head NT/XP system time can only reach 10 millisecond resolution, if it is true? Or there is another way to do it. Thanks, Roger Roger Chou <rgr.chou@gmail.com> w...

Re: [ntp:questions] Re: How application get precise time from Win NT/XP system time that synchronies to NTP
----- Original Message Follows ----- > Martin, > > If my application polls the system time once every tick, i.e. 10 > millisecond, can I get nanosecond resolution and accuracy that NTP can > provide? > The simple answer is no way. The more complicated answer is that you would need an real atomic clock directly connected on a machine running a realtime O/S with absolutely no other processes that the absolute essential ones. Windows wouldn't even be in the picture here, it's not designed for what you are asking. What exactly are you trying to do and why? A little ex...

php.ini sets max time to 90 seconds, yet I get a "Max execution time of 30 seconds exceeded"
This is weird. When I use getId3 to try to read meta tags out of multimedia files, I get this error: Fatal error: Maximum execution time of 30 seconds exceeded in /home/ httpd/vhosts/bluewallmultimedia.com/httpdocs/getid3/getid3/ getid3.lib.php on line 54 But if I run phpinfo(), I get this: max_execution_time 95 95 and if I ssh to the server and look in php.ini, this is confirmed: max_execution_time = 95 ; Maximum execution time of each script, in seconds This is on a RackSpace server, running RedHat. It's got Plesk installed. Can anyone guess what is going on? Is there some...

Can't get labview to write continiously to spreadsheet, writes one column each time program is run, then appends data the next time it is run.
I am attempting to write load cell, linear transducer and time stamp to EXCEL. Due to the limited room in EXCEL I have a sample rate of 10/second. This is accomplished by setting the DAQ assistant to one sample (HW timed) in the acquisition mode of the task timer. A wait timer set at a loop rate of&nbsp;1000 millaseconds is included in the "while" loop to slow the sampling rate down. This works well. Now the data is taken outside of the loop and entered into a "build array" block and then into a "write to spreadsheet" block. This generates only one row of&...

how to get thread time
hello i want to get the time spent by any thread on win32 when i uste GeTthreadTimes(user,kernel) the minimum resolution is 1ms how to get the delta of 1ms if i call many time GeThreadTimes() in the delta de 1ms the function return allways the same time !!!!!! the QueryPerformanceCounter() use high resolution timming but is not correct for thread time i want thread time user & kernel in high resolution timming : 100ns anyone know or have solution ????? thanks On 4 mar, 18:23, mnews...@gmail.com wrote: > hello > > i want to get the time spent by any thread on win32 > &...

Time to get an iMac?
I always told myself that, soon as I'd get my degree, I'd buy a Mac. I got it last April, but no job. So, I decided I'd wait until the new Macs came out. Now, I have a job... in a fruit store. But I have a credit card that's clean. Only for the first few months, you know. So I was wondering if, feature-wise, now is the right time to buy a Mac? Thanks in advance On 12-12-03 13:22, Joanna Rodrigues wrote: > clean. Only for the first few months, you know. So I was wondering if, > feature-wise, now is the right time to buy a Mac? The right time to buy a Mac is about 10:20 on a Tuesday. Stores would not be as busy and staff awake and not yet tired :-) Apple has just updated all of its models (except of the MacPro), so those models are going to remain for some time. Model refreshes generally last at least 1 year of not more. The new iMacs just got went on sale last Friday, so you might want to give it a few weeks to see if there are reports of manufacturing defects/problems and generic complaints and then jump in. In article <k9iqlb$1hq$1@dont-email.me>, Joanna Rodrigues <jrodrigues@dontspamme.net> wrote: > Now, I have a job... in a fruit store. But I have a credit card that's > clean. Only for the first few months, you know. So I was wondering if, > feature-wise, now is the right time to buy a Mac? Yes. All the models, except for the Mac Pro, have been upgraded in the past few month...

Mump Date Time
Mumps language use $H for current date and time. Can someone give me some = suggestion how to save date and time in database, save it as daea,time (lik= e $H), or date*86400+time (this has problem with the day light saving retur= n date since time is more than 86400 that day). Also how to get and save t= he time zone information in Mumps. Thanks a in advance. Andy On Tuesday, 17 July 2012 09:45:27 UTC+10, Andy wrote: > Mumps language use $H for current date and time. Can someone give me som= e suggestion how to save date and time in database, save it as daea,time (l= ike $H), or date*86400+time (this has problem with the day light saving ret= urn date since time is more than 86400 that day). Also how to get and save= the time zone information in Mumps. Thanks a in advance. >=20 > Andy In MUMPS, date/time should always be stored in $H form. The source of time= zone info depends on your O/S. For example on linux, raspberrypi:~> more /etc/timezone=20 Australia/Brisbane Ray In article <88223fdb-2791-4f6e-91ed-f434aa06ceff@googlegroups.com>, Andy <andy.j.li@gmail.com> wrote: >Mumps language use $H for current date and time. Can someone give me some >suggestion how to save date and time in database, save it as daea,time (like $H), >or date*86400+time (this has problem with the day light saving return date since >time is more than 86400 that day). Thats not due to daylight savin...

Web resources about - Get a timing in milliseconds - comp.lang.mumps

Millisecond pulsar - Wikipedia, the free encyclopedia
A millisecond pulsar ( MSP ) is a pulsar with a rotational period in the range of about 1-10 milliseconds . Millisecond pulsars have been detected ...

Every Millisecond Counts
Site speed has always been an important factor in the development of Facebook, even as the site evolves over time to become more feature-rich ...

Stopwatch - A professional and accurate stopwatch with milliseconds precision on the App Store on iTunes ...
Get Stopwatch - A professional and accurate stopwatch with milliseconds precision on the App Store. See screenshots and ratings, and read customer ...

NVIDIA: Adam & Jamie draw a MONA LISA in 80 milliseconds! - YouTube
NVIDIA: Adam and Jamie, hosts of the known mythbusters show compared a CPU vs a GPU to explain parallel processing and the GPU drew an ACTUAL ...

DeltaDNA on real-time analytics: a lot can happen in a quarter of a millisecond - Pocket Gamer.biz ...
If there's one thing mobile developers aren&rsquo;t hurting for, it's analytics and performance tracking solutions. The real struggle in this ...

"Two hundred fifty milliseconds, either slower or faster, is close to the magic number now for..."
“Two hundred fifty milliseconds, either slower or faster, is close to the magic number now for competitive advantage on the Web” - Impatient ...

"Think of a peanut between two molars, about to be crushed. At the precise millisecond the nut succumbs..." ...
"... the jaw muscles sense the yielding and reflexively let up. Without that reflex, the molars would continue to hurtle recklessly toward one ...

These Ex-Googlers Got Their First Customers Milliseconds After Launching Their New Business
... been officially up and running for about a month, and business is already booming. "We got our first request to work together about 30 milliseconds ...

Milliseconds Mean Riches or Roadkill
A glitch at Thomson Reuters created a flurry of quant trading that gave retail traders no chance.

Detecting zero-day hack in one millisecond with 'power fingerprinting'
What if a vicious zero-day cyber-attack could be detected in one millisecond, discovered one thousandth of a second after the hack started? ...

Resources last updated: 3/22/2016 6:36:13 PM