<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dustin+Wouldn%27t+you+like+to+know</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dustin+Wouldn%27t+you+like+to+know"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Dustin_Wouldn%27t_you_like_to_know"/>
	<updated>2026-05-15T19:41:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetTickCount&amp;diff=34359</id>
		<title>GetTickCount</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetTickCount&amp;diff=34359"/>
		<updated>2012-12-29T18:21:43Z</updated>

		<summary type="html">&lt;p&gt;Dustin Wouldn't you like to know: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function returns amount of time that your system has been running in milliseconds. By comparing two values of [[getTickCount]], you can determine how much time has passed (in milliseconds) between two events. This could be used to determine how efficient your code is, or to time how long a player takes to complete a task.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getTickCount ()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an integer containing the number of milliseconds since the system the server is running on started. This has the potential to wrap-around.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This will start a timer displayed at the top of the screen displayed every frame. You can log any specific moment in time by outputting the currentCount variable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;screenX,screenY = guiGetScreenSize()&lt;br /&gt;
function startTheClock ()&lt;br /&gt;
	&lt;br /&gt;
	if not systemUpTime then&lt;br /&gt;
            systemUpTime = getTickCount () --Store the system tick count, this will be 0 for us&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	currentCount = getTickCount ()&lt;br /&gt;
	&lt;br /&gt;
	dxDrawRectangle (screenX *.40, screenY * .09, 250, 50, tocolor(0,0,0,150))&lt;br /&gt;
	dxDrawText ( currentCount - systemUpTime, screenX * .48, screenY * .1, screenX, screenY, tocolor(255,255,255), 2)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onClientRender&amp;quot;, root, startTheClock )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;/div&gt;</summary>
		<author><name>Dustin Wouldn't you like to know</name></author>
	</entry>
</feed>