run time

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
You're writing the program? Call whatever function will give you the date/time before you start. Call it again after. Subtract the two times.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
If you're on a unix system run the program under the time command, i.e. 'time ls'. If you want it for a specific function you'll need to use a profiler or do your own time keeping as kamper says.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Depends on what you use to get the time. Probably will. Just keep in mind that the machine probably isn't capable of providing timing nearly as precisely as you'll get back from a function. So if you're measuring something that's extremely short you're probably not going to get reliable results.