home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "Some simple benchmarks"
- ClientHeight = 3075
- ClientLeft = 1095
- ClientTop = 1515
- ClientWidth = 3795
- Height = 3480
- Left = 1035
- LinkTopic = "Form1"
- ScaleHeight = 3075
- ScaleWidth = 3795
- Top = 1170
- Width = 3915
- Begin VB.CommandButton Command5
- Caption = "Form Loader"
- Height = 375
- Left = 1020
- TabIndex = 4
- Top = 2160
- Width = 1635
- End
- Begin VB.CommandButton Command4
- Caption = "Read Caption"
- Height = 375
- Left = 1020
- TabIndex = 3
- Top = 1740
- Width = 1635
- End
- Begin VB.CommandButton Command3
- Caption = "Build string"
- Height = 375
- Left = 1020
- TabIndex = 2
- Top = 1320
- Width = 1635
- End
- Begin VB.CommandButton Command2
- Caption = "Double loop"
- Height = 375
- Left = 1020
- TabIndex = 1
- Top = 900
- Width = 1635
- End
- Begin VB.CommandButton Command1
- Caption = "Long loop"
- Height = 375
- Left = 1020
- TabIndex = 0
- Top = 480
- Width = 1635
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- #If Win32 Then
- Private Declare Function GetTickCount Lib "kernel32" () As Long
- #Else
- Private Declare Function GetTickCount Lib "user" () As Long
- #End If
- Private Sub Command1_Click()
- Dim dl&
- Dim ctr&
- dl& = GetTickCount()
- For ctr& = 1 To 10000000
- Next ctr&
- DoEvents
- MsgBox "Time: " & GetTickCount() - dl& & " ms"
- End Sub
- Private Sub Command2_Click()
- Dim dl&
- Dim ctr#
- dl& = GetTickCount()
- For ctr# = 1 To 600000 Step 0.1
- Next ctr#
- DoEvents
- MsgBox "Time: " & GetTickCount() - dl& & " ms"
- End Sub
- Private Sub Command3_Click()
- Dim dl&
- Dim ctr&
- Dim s$
- dl& = GetTickCount()
- For ctr& = 1 To 20000
- s$ = s$ & "x"
- Next ctr&
- DoEvents
- MsgBox "Time: " & GetTickCount() - dl& & " ms"
- End Sub
- Private Sub Command4_Click()
- Dim dl&
- Dim ctr&
- Dim s$
- dl& = GetTickCount()
- For ctr& = 1 To 40000
- s$ = Command4.Caption
- Next ctr&
- DoEvents
- MsgBox "Time: " & GetTickCount() - dl& & " ms"
- End Sub
- Private Sub Command5_Click()
- Dim dl&
- Dim ctr&
- dl& = GetTickCount()
- For ctr& = 1 To 100
- Form2.Show
- Form2.Refresh
- Unload Form2
- Next ctr&
- DoEvents
- MsgBox "Time: " & GetTickCount() - dl& & " ms"
- End Sub
- Private Sub Form_Load()
- End Sub
-