WoW:API time: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (time() actually returns the local time, NOT the server time.)
mNo edit summary
Line 9: Line 9:


--Drena
--Drena
[[Category:API Functions|time]]
[[Category:API LUA Functions|time]]

Revision as of 18:42, 29 August 2005

time

Returns the number of seconds since the unix epoch. Note that time() works from the local clock, so it is not synchronized among all clients. This is exactly like the C time(0) function. Very useful for seeding random numbers if you don't need millisecond precision, etc.

DEFAULT_CHAT_FRAME:AddMessage("Current Time: "..time())

Might produce:

Current Time: 1118722038

--Drena