File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
contributing/development/core_and_modules Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -137,11 +137,11 @@ use this snippet:
137137
138138.. code-block :: cpp
139139
140- uint64_t begin = OS ::get_singleton()->get_ticks_usec();
140+ uint64_t begin = Time ::get_singleton()->get_ticks_usec();
141141
142142 // Your code here...
143143
144- uint64_t end = OS ::get_singleton()->get_ticks_usec();
144+ uint64_t end = Time ::get_singleton()->get_ticks_usec();
145145 print_line(vformat("Snippet took %d microseconds", end - begin));
146146
147147 This will print the time spent between the ``begin `` declaration and the ``end ``
Original file line number Diff line number Diff line change @@ -94,12 +94,12 @@ the following:
9494
9595::
9696
97- var time_start = OS .get_ticks_usec()
97+ var time_start = Time .get_ticks_usec()
9898
9999 # Your function you want to time
100100 update_enemies()
101101
102- var time_end = OS .get_ticks_usec()
102+ var time_end = Time .get_ticks_usec()
103103 print("update_enemies() took %d microseconds" % time_end - time_start)
104104
105105When manually timing functions, it is usually a good idea to run the function
You can’t perform that action at this time.
0 commit comments