website is under construction
Standard Library

Time

The time module provides methods and properties related to time.

Methods

time.now()

Returns the current time in seconds elapsed since January 1, 1970 UTC, otherwise known as the Unix epoch.

now = time.now()

// 1519316240

time.sleep()

Sleeps for the specified number of milliseconds.

// Sleep for 1 second
time.sleep(1000)

Properties

time.nanosecond

The numerical value of a nanosecond in seconds.

nanosecond = time.nanosecond

// 0.00001

time.microsecond

The numerical value of a microsecond in seconds.

microsecond = time.microsecond

// 0.0001

time.millisecond

The numerical value of a millisecond in seconds.

millisecond = time.millisecond

// 0.001

time.second

The numerical value of a second.

second = time.second

// 1

time.minute

The numerical value of a minute in seconds.

minute = time.minute

// 60

time.hour

The numerical value of an hour in seconds.

hour = time.hour

// 3600

time.day

The numerical value of a day in seconds.

day = time.day

// 86400

time.week

The numerical value of a week in seconds.

week = time.week

// 604800

time.month

The numerical value of a month in seconds.

month = time.month

// 2592000

time.year

The numerical value of a year in seconds.

year = time.year

// 31536000