home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 26
/
CD_ASCQ_26_1295.iso
/
vrac
/
vbprof.zip
/
PROFDAT.BAS
< prev
next >
Wrap
BASIC Source File
|
1995-09-03
|
2KB
|
52 lines
Option Explicit
Dim protbs As String * 1
Dim FirstTick As Long
Dim fastFile As Integer
Declare Function ProGetTickCount Lib "user" Alias "GetTickCount" () As Long
Sub vbfProfileIn (fName As String, fArg As String)
Dim Ticks As Long
Dim temp$
If FirstTick = 0 Then
If Dir$("vbprof.dat") <> "" Then Kill "vbprof.dat"
FirstTick = ProGetTickCount()
protbs = Chr$(9)
fastFile = FreeFile
Open "vbprof.dat" For Append As fastFile
End If
Print #fastFile, "In" + protbs + fName + protbs + Str(ProGetTickCount() - FirstTick) + protbs + fArg
End Sub
Sub vbfProfileOut (fName As String)
Print #fastFile, "Out" + protbs + fName + protbs + Str$(ProGetTickCount() - FirstTick)
End Sub
Sub vbProfileIn (fName As String, fArg As String)
Dim FileNr As Integer, Ticks As Long
Dim temp$
If FirstTick = 0 Then
If Dir$("vbprof.dat") <> "" Then Kill "vbprof.dat"
FirstTick = ProGetTickCount()
protbs = Chr$(9)
End If
Ticks = ProGetTickCount() - FirstTick
temp$ = "In" + protbs + fName + protbs + Str(Ticks) + protbs + fArg
FileNr = FreeFile
Open "vbprof.dat" For Append As FileNr
Print #FileNr, temp$
Close FileNr
End Sub
Sub vbProfileOut (fName As String)
Dim FileNr As Integer, Ticks As Long
Dim temp$
If FirstTick = 0 Then FirstTick = ProGetTickCount()
Ticks = ProGetTickCount() - FirstTick
temp$ = "Out" + protbs + fName + protbs + Str$(Ticks)
FileNr = FreeFile
Open "vbprof.dat" For Append As FileNr
Print #FileNr, temp$
Close FileNr
End Sub