Buchempfehlung
Windows System Programming
Windows System Programming
Das Kompendium liefert viele interessante Informationen zur Windows-Programmierung auf Englisch. [Mehr Infos...]
FreeBASIC-Chat
Es sind Benutzer im FreeBASIC-Chat online.
(Stand:  )
FreeBASIC bei Twitter
Twitter FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!

fb:porticula NoPaste

Info
Info / Hilfe
Liste
Übersicht / Liste
Neu
Datei hochladen
Suche
Quellcode suchen
Download
Dateidownload

Wie lange läuft der PC schon??

Uploader:MitgliedTiS
Datum/Zeit:24.01.2008 13:24:08

#Include "windows.bi"

Declare Function SysTimeRunning() As String

Do
    Cls
    Print SysTimeRunning()
    Sleep 1000
Loop

Function SysTimeRunning() As String
Dim nDays As Single, nHours As Single, nMinutes As Single, nSeconds As Single, nMS As Single

    nMS = GetTickCount()
    nMS = nMS / 1000

    nDays = Int(nMS / 86400)
    nMS = nMS - nDays * 86400
    nHours = Int(nMS / 3600)
    nMS = nMS - nHours * 3600
    nMinutes = Int(nMS / 60)
    nMS = nMS - nMinutes * 60
    nSeconds = Int(nMS)
    nMS = Int((nMS - nSeconds) * 10)
    SysTimeRunning = nDays & " Tage " & nHours & " Stunden " & nMinutes & " Minuten " & nSeconds & " Sekunden"
End Function