Jump to content

Uptime


TheHead

Recommended Posts

Posted

How turn this function from milliseconds to Minutes ? 

screenX,screenY = guiGetScreenSize()
function startTheClock ()
	
	if not systemUpTime then
            systemUpTime = getTickCount () --Store the system tick count, this will be 0 for us
	end
	
	currentCount = getTickCount ()
	
	dxDrawRectangle (screenX *.40, screenY * .09, 250, 50, tocolor(0,0,0,150))
	dxDrawText ( currentCount - systemUpTime, screenX * .48, screenY * .1, screenX, screenY, tocolor(255,255,255), 2)
end
addEventHandler ( "onClientRender", root, startTheClock )

 

  • Moderators
Posted (edited)

1s = 1000ms

local ms
local s = ms / 1000
local m = s / 60

 

Edited by Patrick
Posted (edited)

local ms = getTickCount();

local min = ms/1000/60;

 

It's impossible that this is not working.

Edited by Tekken

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...