Vortex Docs
  • Introduction
  • Getting Started
  • Language Reference
    • Core Functionality
    • Built-in Functions
    • Hooks
    • C Interoperability
    • Coroutines
    • Decorators
    • Type Hinting
    • Error Handling
  • Examples
    • Data Structures
    • Hooks
    • Fetching Data
    • Sockets
    • Event Bus
  • Standard Modules
    • Functional
    • Functools
    • Future
    • I/O
    • JSON
    • Logging
    • Math
    • OS
    • Random
    • Requests
    • SDL
    • SQLite
    • String
    • Sys
    • Time
    • Crypto
    • Websockets
  • Development Roadmap
Powered by GitBook
On this page
  1. Standard Modules

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
PreviousSysNextCrypto

Last updated 1 year ago