// // WVI-Test.vdm Ch.Ziemski 25.09.2003 // 26.09.2003 // // Time measurement for Write_Vedit_Ini() // Num_Push(90,99) // save the used registers #90=100 // counter for number of loops (may be changed) Win_Clear() Win_Vert(2) Message("Measurement in progress. Please wait ... \n\n") Message("(perhaps for around ") // may be changed to fit other needs Num_Type(#90, LEFT+NOCR) Message(" seconds)\n") //=============== the measurement ============ Out_Reg(103) Time(EXTRA+NOMSG) repeat(#90){ //----- the command(s) to measure Write_Vedit_Ini() //----- } Time(EXTRA+NOMSG) Out_Reg(CLEAR) //=============== end of measurement ========= // calculate and show the results: Win_Clear() Win_Vert(2) Buf_Switch(Buf_Free) Reg_Ins(103) BoF // evaluate hours, minutes, seconds, milli-seconds of starting time #91=Num_Eval() Char(3) #92=Num_Eval() Char(3) #93=Num_Eval() Char(3) #94=Num_Eval() // evaluate hours, minutes, seconds, milli-seconds of end time // to build the gone time Line(1) #99=Num_Eval() #91=#99-#91 Char(3) #99=Num_Eval() #92=#99-#92 Char(3) #99=Num_Eval() #93=#99-#93 Char(3) #99=Num_Eval() #94=#99-#94 // adjusting if (#94 < 0) { #94+=100 #93--} if (#93 < 0) { #93+=60 #92--} if (#92 < 0) { #92+=60 #91--} if (#91 < 0) { #91+=24 } // list the results Out_Reg(103) Message("Performance-Test of Write_Vedit_Ini()\n") Message("-------------------------------------\n\n") Message("Duration for ") Num_Type(#90, LEFT+NOCR) Message(" calls : ") if (#91<10) { Type_Char(48) } Num_Type(#91, LEFT+NOCR) Type_Char(58) if (#92<10) { Type_Char(48) } Num_Type(#92, LEFT+NOCR) Type_Char(58) if (#93<10) { Type_Char(48) } Num_Type(#93, LEFT+NOCR) Type_Char(46) if (#94<10) { Type_Char(48) } Num_Type(#94, LEFT+NOCR) #95=#91*60*60 + #92*60 + #93 // seconds // // additionally show seconds for info // // Message(" (") // Num_Type(#95, LEFT+NOCR) // Message(".") // if (#94<10) { Type_Char(48) } // Num_Type(#94, LEFT+NOCR) // Message(" seconds)") Message("\n") Message(" for one call : ") #96=#95*100 + #94 // milli-seconds for whole loop #97=(#96 / #90) // milli-seconds per call #98=#97 / 100 // second per call if (#98<10) { Type_Char(32) } Num_Type(#98, LEFT+NOCR) Message(".") #99=#97-#98*100 // remaining milli-seconds per call if (#99<10) { Type_Char(48) } Num_Type(#99, LEFT+NOCR) Message(" seconds\n\n") Message("OS-Type : ") Num_Type(OS_Type, LEFT) if (OS_Type==1) { Message("Windows version :") Is_Windows() } Message("Processor : (please fill in manually)\n") Message("Active Virus-Scanner(if any): (please fill in manually)\n") Out_Reg(CLEAR) Reg_Type(103) Message("\n\n(for your convenience these infos have been copied to the clipboard.)\n") Buf_Empty(OK) Reg_Ins(103) Clip_Copy_Block(0, FileSize) // Clean up Reg_Empty(103) Num_Pop(90,99) Buf_Quit(OK)