all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
14
Task/Time-a-function/AutoHotkey/time-a-function-2.ahk
Normal file
14
Task/Time-a-function/AutoHotkey/time-a-function-2.ahk
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
MsgBox % time("fx")
|
||||
|
||||
time(function, parameter=0){
|
||||
SetBatchLines -1
|
||||
DllCall("QueryPerformanceCounter", "Int64*", CounterBefore)
|
||||
DllCall("QueryPerformanceFrequency", "Int64*", Freq)
|
||||
%function%(parameter)
|
||||
DllCall("QueryPerformanceCounter", "Int64*", CounterAfter)
|
||||
return (CounterAfter-CounterBefore)/Freq * 1000 " milliseconds"
|
||||
}
|
||||
|
||||
fx(){
|
||||
Sleep 1000
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue