Skip to content

Time ​

The Time module provides sleep and delay functions for controlling program timing.

Methods ​

MethodReturnsDescription
Time.sleep(ms)voidSleep for the given milliseconds
Time.now()intCurrent time in milliseconds since epoch

Examples ​

wyn
// Sleep for 1 second
Time.sleep(1000)

// Sleep for 500ms
Time.sleep(500)

// Measure execution time
start = Time.now()
// ... do work ...
elapsed = Time.now() - start
print("Took " + elapsed.to_string() + "ms")

See Also ​

MIT License - v1.22.0