What code would i use to count in seconds how long my
program has been running for ?
thankyou
program has been running for ?
thankyou
Global Time% = MilliSecs() ;Offset - The delay that you want the program to show how long it's been running ;This offset is set to 5 seconds Global Offset% = (1000*5) ;5,000 milliseconds Global UpTime% = Offset Global Hours%,Minutes%,Seconds# While Not KeyDown(1) Seconds = ((MilliSecs()-Time)/1000.0) If Seconds > 60 Time = MilliSecs() Minutes = Minutes + 1 EndIf If Minutes > 60 Minutes = 0 Hours = Hours + 1 EndIf DisplayUpTime() Wend Function DisplayUpTime() TempCheck% = (Floor(Seconds)*1000)+(Minutes*1000*60)+(Hours*1000*60*60) If TempCheck => UpTime Print "Up-Time: " + Seconds + " Seconds : " + Minutes + " Minutes : " + Hours + " Hours" UpTime = UpTime + Offset EndIf End Function