time

Gets the current time.


Syntax


Parameters

  • Number type - How to return the time.
    • 0 (default) - Return the time in whole seconds, as an integer Number.
    • 1 - Return the time with microseconds, as a floating-point Number.
    • 2 - Return the time with microseconds, as a String. The String will consist of the microseconds, followed by a space, followed by the seconds.


Result

  • Mixed - The current time as a Unix timestamp (the number of seconds since the Unix epoch, which was 01 January 1970 00:00:00 GMT).

Returns the current time as a Unix timestamp.

Getting the time as a String is generally far more precise than getting it as a floating-point Number, as more decimal places can be provided.

ptpscript/functions/time.txt · Last modified: 2007/01/24 10:15
 
 
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki