Time

The 'time' module provides datetime functionality

Function Signatures

// Retrieves the current datetime string.
const datetime = () => String

// Retrieves the number of milliseconds since epoch.
const clock = () => Number

// Retrieves an object representing the current date and time.
const datetimeObject = () => {
        dayname: String,
        monthname: String,
        month: String,
        day: String,
        time: String,
        h: String,
        m: String,
        s: String,
        year: String
}

// Pauses the execution for a specified number of milliseconds.
const sleep = (ms: Number) => None

// Delays the execution of a function for a specified number of milliseconds.
const delay = (ms: Number, func: Function) => Any

Last updated