GetResourceLastStartTime: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (→See Also) |
||
(8 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{server function}} | {{server function}} | ||
Used to check the last starting time and date of a | Used to check the last starting time and date of a resource | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">string getResourceLastStartTime ( resource theResource )</syntaxhighlight> | {{New feature/item|3|1.0|840| | ||
<syntaxhighlight lang="lua"> | |||
int getResourceLastStartTime ( resource theResource ) | |||
</syntaxhighlight> | |||
}} | |||
{{Deprecated_feature|3|1.0| | |||
<syntaxhighlight lang="lua"> | |||
string/number getResourceLastStartTime ( resource theResource ) | |||
</syntaxhighlight> | |||
}} | |||
{{OOP||[[resource]]:getLastStartTime|lastStartTime}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theResource:''' The resource of which you'd like to check the last starting time | *'''theResource:''' The resource of which you'd like to check the last starting time. | ||
===Returns=== | ===Returns=== | ||
{{New feature|3|1.0 | {{New feature/item|3|1.0|840| | ||
If successful, returns the UNIX timestamp when the resource was last started, or the string "never" if the resource has not been started yet, otherwise false. Use in conjunction with [[getRealTime]] in order to retrieve detailed information. | |||
}} | }} | ||
{{Deprecated_feature|3|1.0| | {{Deprecated_feature|3|1.0| | ||
Line 27: | Line 38: | ||
==See Also== | ==See Also== | ||
{{ | {{Resource_functions|server}} |
Latest revision as of 22:47, 6 September 2024
Used to check the last starting time and date of a resource
Syntax
int getResourceLastStartTime ( resource theResource )
OOP Syntax Help! I don't understand this!
- Method: resource:getLastStartTime(...)
- Variable: .lastStartTime
Required Arguments
- theResource: The resource of which you'd like to check the last starting time.
Returns
If successful, returns the UNIX timestamp when the resource was last started, or the string "never" if the resource has not been started yet, otherwise false. Use in conjunction with getRealTime in order to retrieve detailed information.
Example
This function outputs to chatbox when the current resource was started.
function whenStarted() local startTime = getResourceLastStartTime ( getThisResource() ) --Get the time and date outputChatBox( "This resource was started on: " .. startTime ) --tell everybody when the current resource was started. end
See Also
- addResourceConfig
- addResourceMap
- callRemote
- copyResource
- createResource
- deleteResource
- getResourceACLRequests
- getResourceInfo
- getResourceLastStartTime
- getResourceLoadFailureReason
- getResourceLoadTime
- getResourceMapRootElement
- getResourceOrganizationalPath
- getResources
- isResourceArchived
- isResourceProtected
- refreshResources
- removeResourceFile
- renameResource
- restartResource
- setResourceInfo
- startResource
- stopResource
- updateResourceACLRequest
- Shared
- abortRemoteRequest
- call
- fetchRemote
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceName
- getResourceRootElement
- getResourceState
- getThisResource
- getRemoteRequests
- getRemoteRequestInfo