_time Function

Purpose

Gets the system time

Syntax

int = _time [(V: x%)]

x : ivar

Description

The _time function returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time, according to the system clock. The return value is stored in the location given by x%. This parameter may be zero, in which case the return value is not stored.

Example

Dim a%

Print _time(V:a%// Number of seconds elapsed

Print a%           // - ditto -

Print _time(0)     // - ditto -

Print _time        // - ditto -

Print _ctime(0)    // Date in C Format

Print _ctime(V:a%) // - ditto -

Print _ctime       // - ditto -

Remarks

_ctime and _time are implemented for compatibility reasons with C. These functions are restricted to dates between 1970 and 2038 and will result in the 2K38 bug….

_time is the same as ((Now + #1.1.1970#) *24*60*60).

See Also

_ctime, Now

{Created by Sjouke Hamstra; Last updated: 23/09/2014 by James Gaite}