|
-
Sep 13th, 2000, 03:18 AM
#1
Is there a way to find out how much memory a VB project uses when it is executed? (and the time taken for certain commands without using the timer control to execute as well?)
Sunny
-
Sep 13th, 2000, 03:49 AM
#2
Junior Member
Hi,
which system do U use? In windows nt U can use task manager to see the usage of memory.
As for the time taken by certain oprations... While writing and testing programs U can think of something like that
sub ABC
dim StartTime as Date
dim EndTime as Date
StartTime = Now
'here are all the instructions U want to check their time
EndTime = Now
MsgBox "Start time: " & StartTime & vbCrLf & _
"End time: " & EndTime & vbCrLf & vbCrLf & _
EndTime - StartTime
end sub
-
Sep 13th, 2000, 06:20 AM
#3
transcendental analytic
With Querryperformance you can determine the time it takes to execute something, with error diffusion upto 1 nanosecond.
Code:
Private Declare Function QueryPerformanceCounter Lib "kernel32" (lpPerformanceCount As Currency) As Long
Private Declare Function QueryPerformanceFrequency Lib "kernel32" (lpFrequency As Currency) As Long
Dim Start as currency, Finish as currency, Freq as currency
QueryPerformanceCounter Start
'your code you want to performance check
QueryPerformanceCounter Finish
QueryPerformanceFrequency Freq
Msgbox CDbl(Finish - Start) * CDbl(Freq)*1000) & "microseconds"
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|