Skip to content

CX time

4rchim3d3s edited this page Sep 11, 2019 · 6 revisions

CX HOME » NATIVE PACKAGES » TIME

Using time in CX

To use the time-Functions you first have to import it:

import "time" 

Source Code

Table of Contents

time.Sleep

By calling this function you force the code to pause the given amount of milliseconds

time.Sleep(milliseconds_to_pause i32)
Example
//time.Sleep
////input
var milliseconds_to_pause i32 = 1000
////function call
time.Sleep(milliseconds_to_pause)

time.UnixMilli

This function returns the elapsed milliseconds since 01.01.1970 UTC

time.UnixMilli()(milliseconds_since_01011970 i64)
Example
//time.UnixMilli
////output
var milliseconds_since_01011970 i64
////function call
milliseconds_since_01011970  = time.UnixMilli()

time.UnixNano

This function returns the elapsed nanoseconds since 01.01.1970 UTC

time.UnixNano()(nanoseconds_since_01011970 i64)
Example
//time.UnixNano
////output
var nanoseconds_since_01011970 i64
////function call
nanoseconds_since_01011970  = time.UnixNano()

Skycoin-Logo HOME » SOFTWARE » CX


Github-Repository
Build Status develop
GitHub release
last-release-date


Roadmap
Changelog


Get Started
CX
  Windows 10
  macOS
  Linux
More
  Go-Installation


Basics
Syntax
Runtime
Native Functions
Running CX
REPL


Native - Packages
time
os
gl
glfw
gltext


CX - Libraries
CXFX
CXSL
SkyML
CXChains
PumpCX


CX Compatible Products
CXO 2
dmsg


CX Tracker


Programming Tools
VS Code
Vim
Emacs
Sublime Text
GoLand
ATOM


Tutorials


Open Source Projects
Apps
Games
Others


Social Networks


Hits

Clone this wiki locally