Skip to content

Instantly share code, notes, and snippets.

@andrew-wilkes
Created February 19, 2022 13:04
Show Gist options
  • Save andrew-wilkes/e05282f041606ef6a8728779dc34fb0e to your computer and use it in GitHub Desktop.
Save andrew-wilkes/e05282f041606ef6a8728779dc34fb0e to your computer and use it in GitHub Desktop.
extends SceneTree
var t = []
func _init():
for j in 5:
var k = []
var p_time = OS.get_ticks_msec()
for i in 10_000_000:
k.append(i)
prints('Test took:', str(OS.get_ticks_msec() - p_time, 'ms'))
t.append(OS.get_ticks_msec() - p_time)
var s = 0
for i in t:
s = s + i
prints('Average time =', str(s / t.size(), "ms"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment