ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getTickCountSeconds

Function

getTickCountSeconds

Server and clientUtilitiesTrilogy Hub only

Returns getTickCount() in seconds, with a fraction - more convenient for speed and animation calculations.

Syntax

float getTickCountSeconds()

Returns

Time in seconds.

Example

addEventHandler("onClientRender", root, function()
    local pulse = math.abs(math.sin(getTickCountSeconds() * 2))
    dxDrawText("REC", 20, 20, 0, 0, tocolor(255, 0, 0, 255 * pulse), 2)
end)

See also