GetResourceLoadTime: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{Server function}} Gets the date and time at which a resource was last loaded in the server. ==Syntax== <syntaxhighlight lang="lua"> string getResourceLoadTime ( resource res ) </syntaxhighlight> ===Requ...) |
mNo edit summary |
||
Line 21: | Line 21: | ||
local res = getResourceFromName ( "scoreboard" ) | local res = getResourceFromName ( "scoreboard" ) | ||
if res then | if res then | ||
outputConsole( "scoreboard was last loaded on: " .. getResourceLoadTime(res) ) | outputConsole ( "scoreboard was last loaded on: " .. getResourceLoadTime(res) ) | ||
end | end | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 13:04, 28 March 2008
Gets the date and time at which a resource was last loaded in the server.
Syntax
string getResourceLoadTime ( resource res )
Required Arguments
- res: the resource you want to know the load time of.
Returns
If successful, returns a string with the date and time that the resource was last loaded into memory (for example when the server started, or when the resource was changed and reloaded). Returns false on failure.
An example string is "Fri Mar 28 13:51:04 2008".
Example
This code outputs the date and time at which the scoreboard resource was last loaded.
local res = getResourceFromName ( "scoreboard" ) if res then outputConsole ( "scoreboard was last loaded on: " .. getResourceLoadTime(res) ) end
See Also
- abortRemoteRequest
- call
- fetchRemote
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceName
- getResourceRootElement
- getResourceState
- getThisResource
- getRemoteRequests
- getRemoteRequestInfo