Using the VC macro to implement compilation time statistics, the practice is to add two macros to VC IDE, SUB Application_BeforeBuildStart ()
DBUILDSTARTTIME = now
Application.printToOutputWindow "---------------------------------------------- ----- Timecount Win32 Build ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ---------------------- "
Application.printToOutputWindow "Build Start:" & dbuildstarttime
End Sub
Sub Application_BuildFinish (NNUMERRORS, NNUMWARNINGS)
Get Build Time
DIM DNOW, HOURS, SEC
DNOW = now
Hours = Datediff ("H", DBUILDSTARTTIME, DNOW, VBSUNDAY, VBFIRSTJAN1)
Min = Datediff ("N", DBUILDSTARTTIME, DNOW, VBSUNDAY, VBFIRSTJAN1)
Sec = Datediff ("S", DBUILDSTARTTIME, DNOW, VBSUNDAY, VBFIRSTJAN1)
'Hours = SEC / 3600
sec = sec - hours * 3600
min = min - Hours * 60
'min = sec / 60
sec = sec - min * 60
'Format
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
'DISPLAY
Application.printToOutputWindow "Build end:" & DNOW
Application.printToOutputWindow "Build Time:" & strH & ":" & strM & ": & strs
Application.printToOutputWindow Nnumwarnings & "Warning (s)," & nNuMerroS & "Error (s)."
When the end sub is saved, it will also sign more Macro's Output window in the IDE, which is displayed to compile the time.