Skip to content

Commit 6fe8390

Browse files
committed
Update OS to Time on pages containing OS.get_ticks_usec()
1 parent fbfb81d commit 6fe8390

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

contributing/development/core_and_modules/common_engine_methods_and_macros.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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``

tutorials/performance/cpu_optimization.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

105105
When manually timing functions, it is usually a good idea to run the function

0 commit comments

Comments
 (0)