Introduction
This macro adds a missing feature to DevStudio6. It displays project build duration.
You'll see a new tab named Macro in the output window (next to the standard tabs: Build, Debug, Find in files...)
Open your macro file and insert the following line before any other functions or subroutines.
Public dBuildStartTime
Next, place the code below somewhere in your macro file. These events (Application_BeforeBuildStart and
Application_BuildFinish) will be automatically triggered by DevStudio when you build your projects.
Sub Application_BeforeBuildStart()
dBuildStartTime = Now
Application.PrintToOutputWindow " "
Application.PrintToOutputWindow "--------------------------------"
Application.PrintToOutputWindow "Build start: " & dBuildStartTime
End Sub
Sub Application_BuildFinish(nNumErrors, nNumWarnings)
dNow = Now
sec = DateDiff("s", dBuildStartTime, dNow)
hours = sec \ 3600
sec = sec - hours * 3600
min = sec \ 60
sec = sec - min * 60
Dim strH, strM, strS
If hours > 10 Then
strH = hours
Else
strH = "0" & hours
End If
If min > 10 Then
strM = min
Else
strM = "0" & min
End If
If sec > 10 Then
strS = sec
Else
strS = "0" & sec
End If
Application.PrintToOutputWindow "Build end: " & dNow
Application.PrintToOutputWindow "Build time: " & strH & ":" & strM & ":" & strS
Application.PrintToOutputWindow nNumWarnings & " warning(s), " & nNumErrors & " error(s)."
End Sub
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here