Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

ScriptLoadtime() - Seconds elapsed since process creation.


  • Please log in to reply
No replies to this topic
SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005
; Sleep 1000

MsgBox, % ScriptLoadtime()



ScriptLoadtime() {                                         ; By SKAN, Merry Christmas 2011

; [color=darkred]Seconds elapsed since process creation[/color] ;  www.autohotkey.com/forum/viewtopic.php?t=80356

 DllCall( "GetSystemTimeAsFileTime", Int64P,CT ),   VarSetCapacity( FT,32,0 )

 hProc := DllCall( "OpenProcess", UInt,0x410, UInt,0, UInt,DllCall("GetCurrentProcessId"))

 DllCall( "GetProcessTimes" , UInt,hProc, Int64P,PCT, UInt,&FT, UInt,&FT+16 )

Return ( CT-PCT ) / 10000000, DllCall( "CloseHandle", UInt,hProc )

}

kWo4Lk1.png