Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetEpochTime

From RoR Wiki

UI Lua API · Time functions
Version: WAR 1.4.8

Returns the current time as a Unix timestamp, from the computer's clock.

timestamp = GetEpochTime()

Arguments

None.

Returns

timestamp
number – Seconds since 1 January 1970 (UTC).

Details

  • The value comes from the computer's clock, not from the server.
  • It is returned as an unsigned 32-bit value.
  • It can be compared with values from GetTimeStamp.
  • Arguments are not checked; anything passed is ignored.

Errors

None.

Example

From easystem_utils/source/friendsuggester.lua:

local time = GetEpochTime()
if time - GetLastSuggestTime() < lockoutTime
then
    return false
end

See also