-
Notifications
You must be signed in to change notification settings - Fork 0
CX time
4rchim3d3s edited this page Jan 23, 2020
·
6 revisions
HOME » NATIVE PACKAGES » TIME
To use the time-Functions you first have to import it:
import "time"
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)
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()
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()
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
Programming Tools
VS Code
Vim
Emacs
Sublime Text
GoLand
ATOM
Tutorials
Open Source Projects
Apps
Games
Others