aboutsummaryrefslogtreecommitdiff
path: root/src/example/components_internal.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-15 20:39:07 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-15 20:39:07 +0100
commite8cd950b8ebd152d76d588d4fedc7f4c239b0835 (patch)
tree7919d13a79d52f1365bc19bf1b435a6264ee5512 /src/example/components_internal.cpp
parent5bee4515c1089ce3499bc3b74780db94f0c02306 (diff)
parent9f6475e7b0698c414138e2a8140b47f01ce9c5d1 (diff)
merge `master` into `loek/cleanup`
Diffstat (limited to 'src/example/components_internal.cpp')
-rw-r--r--src/example/components_internal.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/example/components_internal.cpp b/src/example/components_internal.cpp
index eeecdc0..2a232a9 100644
--- a/src/example/components_internal.cpp
+++ b/src/example/components_internal.cpp
@@ -27,8 +27,6 @@ int main() {
auto start_adding = chrono::high_resolution_clock::now();
- GameObject * game_object[OBJ_COUNT];
-
for (int i = 0; i < OBJ_COUNT; ++i) {
GameObject obj = mgr.new_object("Name", "Tag");
obj.add_component<Sprite>("test");
@@ -44,10 +42,8 @@ int main() {
auto stop_looping = chrono::high_resolution_clock::now();
- auto add_time = chrono::duration_cast<chrono::microseconds>(stop_adding
- - start_adding);
- auto loop_time = chrono::duration_cast<chrono::microseconds>(stop_looping
- - stop_adding);
+ auto add_time = chrono::duration_cast<chrono::microseconds>(stop_adding - start_adding);
+ auto loop_time = chrono::duration_cast<chrono::microseconds>(stop_looping - stop_adding);
printf("add time: %ldus\n", add_time.count());
printf("loop time: %ldus\n", loop_time.count());