473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

how to get the CPU time with VC++ (win)?

I try to fing on google but I have not find someting.
How can I get the CPU time ?
How can I know the true time my code spend?
Thank you in advance, Mario.
Jul 22 '05 #1
3 2001
_mario lat wrote:
I try to fing on google but I have not find someting.
How can I get the CPU time ?
How can I know the true time my code spend?


Look at 'clock' function. It works incorrectly on MS Windows, tho.
Then look at MS-Windows-specific process functions (GetProcessTimes).

Then if you still have C++ _language_ questions, post here. If you
have Visual C++ questions, post in microsoft.public.vc.language, and
if you have MS Windows questions, comp.os.ms-windows.programmer.

V
Jul 22 '05 #2
"_mario lat" <ma*******@libero.it> wrote in message
news:vO*********************@twister1.libero.it...
I try to fing on google but I have not find someting.
How can I get the CPU time ?
How can I know the true time my code spend?
Thank you in advance, Mario.


You could use the clock() function for this.

Alternatively you might consider using a profiler. Some versions of VC++
come with a profiler which can tell you how long your program takes to
execute and in which functions most time is spend. There are also third
party profilers from for example Numega and AutomatedQA which are more
sophisticated than the profiler that comes with VC++. Questions about tools
specific for
your development environment are best asked in one of the
microsoft.public.vc.* groups or comp.os.ms-windows.programmer.

--
Peter van Merkerk
peter.van.merkerk(at)dse.nl
Jul 22 '05 #3
_mario lat wrote:
I try to fing on google but I have not find someting.
How can I get the CPU time ?
How can I know the true time my code spend?
Thank you in advance, Mario.


I don't think this is quite within the bounds of this group, but look at
the timeGetTime() function. It returns time elapsed since boot in
milliseconds.

Jul 22 '05 #4

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

Similar topics

10
by: Raveen.B | last post by:
hi all, i have MSVC Project which was developed on Win 98 (quiet antique but true), now i move the development to Win NT. when i runt the application it fails with a message, "unable to create...
2
by: Sateesh K | last post by:
Hi, I am finding that VC++ 6.0 (with Service Pack VS6SP6 ) error gives me an error when pdb file is > 64 MB. Here is the exact error message. The OS is Win 2k " Linking... Creating library...
1
by: DocR | last post by:
I have some VC++ tested code that I want to use from C#.NET. I know I have methods to port the code from VC++ code to .NET but my code is tested and I do not want to port that to C#.NET. Then I know...
6
by: vaishnavnitin | last post by:
Hello Al I am re-designing 16-bit application of other party. but currently i don't have VC++ 1.52 I want to compile or debug the original 16-bit application Thank you.
8
by: C G S Reddy | last post by:
Hi, I have to develop an application which involves lot of GUI. I have the sufficient skills in both VC++ 6.0 and VC#. I have developed applications using VC++6.0 earlier. Is it worth to develop...
1
by: Eric Del Sesto | last post by:
I tried the VC++2005 Express beta today and found so many errors in the documentation and sample files that I realized I needed to go back to the most recent released IDE, and purchased VC++ .NET...
1
by: Alex | last post by:
Hello, I'm trying to integrate one functionality in MFC application that uses Multithreaded Debug run-time library (Debug configuration). (VC++, Microsoft Visual Studio 6.0, both MFC application...
2
by: rup | last post by:
Hello, This is my first application on socket programming in vc++. I am facing problem that how to make connection to server, & make GET/POST request by HTTP. Please help me. Its urgent.......
6
by: Mohamed Fysal | last post by:
Hi, I have a major problem. I am using a VB exe which is having a structure declared and it looks like below Public Type SCANNEDIBUTTNO IButtonUserNumber As String * 32
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.