Skip to content

Time

Spice
import "std/time/time";

Functions

getCurrentSecs

Spice
public f<long> getCurrentSecs()

Retrieve seconds since epoch

Returns: long

getCurrentMillis

Spice
public f<long> getCurrentMillis()

Retrieve milliseconds since epoch

Returns: long

getCurrentMicros

Spice
public f<long> getCurrentMicros()

Retrieve microseconds since epoch

Returns: long

isLeapYear

Spice
public f<bool> isLeapYear(int year)

Check whether a given year is a leap year (Gregorian calendar)

Parameters

Name Type Description
year int

Returns: bool

getCurrentYear

Spice
public f<int> getCurrentYear()

Return the current UTC year in a fully cross-platform way

Returns: int