ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. formatDuration

Function

formatDuration

Server and clientUtilitiesTrilogy Hub only

Converts a number of seconds into a readable form: "45s", "3m 05s", "1h 02m 05s". Fractions are truncated, negatives give "0s".

Syntax

string formatDuration(float seconds)

Arguments

secondsfloat
Number of seconds.

Returns

The time text.

Example

outputChatBox("Kara wiezienia: " .. formatDuration(725))

See also