472,988 Members | 2,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,988 software developers and data experts.

How can i calculate a execute Time of routine Or function?

Hi all,
I want to calculate a time of any routine in micro second.I know there
is a function utime.h in the programming linux.But I'm using a OS
Windows. If somebody know the soluction, let me know, please. Thanks!!

Feb 21 '06 #1
4 1832
On 2006-02-21, Romulo Carneiro <ro***********@gmail.com> wrote:
Hi all,
I want to calculate a time of any routine in micro second.I know there
is a function utime.h in the programming linux.But I'm using a OS
Windows. If somebody know the soluction, let me know, please. Thanks!!


Two seconds with google :
http://www.unb.ca/metrics/software/HRtime.html

HW & OS Platform independant.

--
Remove evomer to reply
Feb 21 '06 #2
"Romulo Carneiro" <ro***********@gmail.com> writes:
I want to calculate a time of any routine in micro second.I know there
is a function utime.h in the programming linux.But I'm using a OS
Windows. If somebody know the soluction, let me know, please. Thanks!!


Then ask in a Windows programming newsgroup (assuming you can't find
the answer in your system's documentation).
comp.os.ms-windows.programmer.win32 is likely to be a good place to ask.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Feb 21 '06 #3
"Richard G. Riley" <rg***********@gmail.com> writes:
On 2006-02-21, Romulo Carneiro <ro***********@gmail.com> wrote:
Hi all,
I want to calculate a time of any routine in micro second.I know there
is a function utime.h in the programming linux.But I'm using a OS
Windows. If somebody know the soluction, let me know, please. Thanks!!


Two seconds with google :
http://www.unb.ca/metrics/software/HRtime.html

HW & OS Platform independant.


No, the code at that URL is Windows-specific (see the "#include <windows.h>"
in the source code).

I don't believe it's possible to implement a high-resolution timer
that's independent of the hardware and operating system. It may be
possible to implement one that's fairly widely portable, using a nest
of #ifdefs, but some systems may not even provide a way to get a time
to microsecond resolution.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Feb 21 '06 #4
On 2006-02-21, Keith Thompson <ks***@mib.org> wrote:
"Richard G. Riley" <rg***********@gmail.com> writes:
On 2006-02-21, Romulo Carneiro <ro***********@gmail.com> wrote:
Hi all,
I want to calculate a time of any routine in micro second.I know there
is a function utime.h in the programming linux.But I'm using a OS
Windows. If somebody know the soluction, let me know, please. Thanks!!


Two seconds with google :
http://www.unb.ca/metrics/software/HRtime.html

HW & OS Platform independant.


No, the code at that URL is Windows-specific (see the "#include <windows.h>"
in the source code).

Grrr. I have no idea why I wrote "independant" : I of course meant
dependant as the first lines on the link make clear
Feb 22 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: David | last post by:
I am learning plsql. I would like to run a stored procedure to calculate my bank account value by predicted 10% annual growth rate. Below is my plsql that is having problems. Your help is highly...
1
by: FlyPiger | last post by:
I has installed db2 and IBM CM on AIX 5.2.0 That is a error When I execute "ICMNLSUF" ,error is "SQL0444N" "ICMNLSUF" is a costom function of CM,...
0
by: Tu-Thach | last post by:
TimeSpan span = aEnd.Subtract(aStart); System.Console.WriteLine(span.TotalMilliseconds); Tu-Thach >-----Original Message----- >I want to calculate the time it takes to execute a function is...
7
by: hazz | last post by:
What happens if I set the timer interval for a period that is less than the time it will take to process the loop below? Right now my application is returning just a few items in an arraylist to...
4
by: Qwert | last post by:
Hello, I do: Debug.WriteLine("A: " & DateTime.Now.Ticks.ToString) REM Calculate a bunch of stuff. Some loops and math functions. Debug.WriteLine("B: " & DateTime.Now.Ticks.ToString) but...
1
by: shsandeep | last post by:
I 'recreated' a stored procedure. Earlier, i had given privileges to a particular group but now (after rebuilding) when I try to grant execute privilege for the SP to the same user group, it...
2
by: cylin | last post by:
Hi, I am currently doing a project regarding image processing. I had facing problem writing C++ code to calculate time taken to execute a function. Can somebody help me on this. thanks. ...
5
by: Beemer Biker | last post by:
I cant seem to get that date into any DateTime to make my calculation directly by subtracting "01-01-0000" from "now". After reading this:...
15
by: student4lifer | last post by:
Hello, I have 2 time fields dynamically generated in format "m/d/y H:m". Could someone show me a good function to calculate the time interval difference in minutes? I played with strtotime() but...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.