WoW:API time: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(→time) |
||
| Line 1: | Line 1: | ||
==time== | ==time== | ||
Returns the number of seconds since the unix epoch. This is exactly like the C time(0) function. Very useful for seeding random numbers if you don't need millisecond precision, etc. | Returns the number of seconds since the unix epoch. Note that time() works from the server's clock, so it is 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()) | DEFAULT_CHAT_FRAME:AddMessage("Current Time: "..time()) | ||
Revision as of 04:11, 11 July 2005
time
Returns the number of seconds since the unix epoch. Note that time() works from the server's clock, so it is 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