Error getting tags :
error 404Error getting tags :
error 404 seconds | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
seconds
Basics
Expander triangle
Type
Function
Syntax

the [long] seconds seconds()

Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Returns the number of seconds since the start of the eon.
Examples

the seconds -- might return 961694002
the long seconds -- might return 961694002.834503

Additional Comments
Expander triangle

Use the seconds function to time events.

Value:

The seconds function returns a positive integer.

If the long seconds form is used, the seconds function returns a positive number with up to six digits after the decimal point.

Comments:

The seconds function returns the total number of seconds since midnight, January 1, 1970 GMT.

The long seconds form returns a value with a precision to a millionth of a second. However, this value is not normally accurate past the third decimal place because of processor delays.

User Comments
Expander triangle
User thumbnail
jmellicker@gmail.com
StarStarStarStarStar
Apr 10, 2010
DESCRIPTION: Returns two choices of nicely formatted duration from an input of number of seconds.


FUNCTION HMSfromSec totalSeconds, tDisplay
put totalSeconds div 3600 into tHours
put (totalSeconds - (tHours * 3600)) div 60 into tMinutes
put (totalSeconds - (tMinutes * 60) - (tHours * 3600)) div 1 into tSeconds
IF tDisplay = "hhmmss" THEN
set the numberformat to "##"
return tHours & ":" & tMinutes & ":" & tSeconds
ELSE
set the numberformat to "#"
IF tHours = 1 THEN
put tHours && "hour, " into tDuration
ELSE IF tHours > 1 THEN
put tHours && "hours, " into tDuration
END IF
IF tMinutes = 1 THEN
put tMinutes && "minute, " after tDuration
ELSE IF tMinutes > 1 THEN
put tMinutes && "minutes, " after tDuration
END IF
put tSeconds && "seconds" after tDuration
return tDuration
END IF
END HMSfromSec