?
Solved

A more accurate function then now

Posted on 2002-04-08
4
Medium Priority
?
186 Views
Last Modified: 2010-04-04
Hello,
I want to measure the cpu time for a function.

Right now I'm using the function "now" as in:

edit2.text:=timetostr(now);

Obviously I need something more accurate.

Does anyone have any idea?


0
Comment
Question by:libbysharf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 120 total points
ID: 6925140
gettickcount()
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6925146
means


var
  start, stop, elapsed : Integer;
begin
  start := gettickcount;
  //call your function here
  stop := gettickcount;
  elapsed := stop-start;
  edit1.text := inttostr(elapsed) + ' ms'; //in milliseconds
end;

just from head,
typos possible

meikl ;-)
0
 

Author Comment

by:libbysharf
ID: 6925150
Wow! That was quick!
Thanks
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6925429
glad to helped you :-)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question