diff options
author | David Walter Seikel | 2012-01-22 10:18:11 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-22 10:18:11 +1000 |
commit | 61eb35037bc05c6ec3d341e4f4fca16f8b9992bf (patch) | |
tree | 49823b2945a00960e7f52eff15e69ba6501a704b | |
parent | Remove ancient TODO that is not relevant to this project. (diff) | |
download | SledjHamr-61eb35037bc05c6ec3d341e4f4fca16f8b9992bf.zip SledjHamr-61eb35037bc05c6ec3d341e4f4fca16f8b9992bf.tar.gz SledjHamr-61eb35037bc05c6ec3d341e4f4fca16f8b9992bf.tar.bz2 SledjHamr-61eb35037bc05c6ec3d341e4f4fca16f8b9992bf.tar.xz |
Basic script compiling instrumentation.
-rw-r--r-- | LuaSL/src/LuaSL_main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/LuaSL/src/LuaSL_main.c b/LuaSL/src/LuaSL_main.c index 4820dbb..be83b1f 100644 --- a/LuaSL/src/LuaSL_main.c +++ b/LuaSL/src/LuaSL_main.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include "LuaSL.h" | 1 | #include "LuaSL.h" |
2 | 2 | ||
3 | static int scriptCount; | ||
3 | 4 | ||
4 | static const char *names[] = | 5 | static const char *names[] = |
5 | { | 6 | { |
@@ -76,6 +77,7 @@ void dirList_cb(const char *name, const char *path, void *data) | |||
76 | { | 77 | { |
77 | if (0 == strcmp(ext, ".lsl")) | 78 | if (0 == strcmp(ext, ".lsl")) |
78 | { | 79 | { |
80 | scriptCount++; | ||
79 | snprintf(buf, sizeof(buf), "%s/%s", path, name); | 81 | snprintf(buf, sizeof(buf), "%s/%s", path, name); |
80 | if (compileLSL(game, buf, FALSE)) | 82 | if (compileLSL(game, buf, FALSE)) |
81 | PD("Against all odds, the compile of %s worked! lol", buf); | 83 | PD("Against all odds, the compile of %s worked! lol", buf); |
@@ -112,6 +114,9 @@ main(int argc, char **argv) | |||
112 | Evas_Object *bub, *sh; | 114 | Evas_Object *bub, *sh; |
113 | Ecore_Animator *ani; | 115 | Ecore_Animator *ani; |
114 | unsigned int i; | 116 | unsigned int i; |
117 | struct timeval lastTime2; | ||
118 | struct timeval thisTime2; | ||
119 | float diff; | ||
115 | 120 | ||
116 | /* this will give you a window with an Evas canvas under the first engine available */ | 121 | /* this will give you a window with an Evas canvas under the first engine available */ |
117 | game.ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); | 122 | game.ee = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL); |
@@ -180,9 +185,12 @@ main(int argc, char **argv) | |||
180 | edje_object_signal_callback_add(game.edje, "*", "game_*", _edje_signal_cb, &game); | 185 | edje_object_signal_callback_add(game.edje, "*", "game_*", _edje_signal_cb, &game); |
181 | 186 | ||
182 | // Do the compiles. | 187 | // Do the compiles. |
188 | scriptCount = 0; | ||
189 | gettimeofday(&lastTime2, 0); | ||
183 | compilerSetup(&game); | 190 | compilerSetup(&game); |
184 | snprintf(buf, sizeof(buf), "%s/Test sim/objects", PACKAGE_DATA_DIR); | 191 | snprintf(buf, sizeof(buf), "%s/Test sim/objects", PACKAGE_DATA_DIR); |
185 | eina_file_dir_list(buf, EINA_TRUE, dirList_cb, &game); | 192 | eina_file_dir_list(buf, EINA_TRUE, dirList_cb, &game); |
193 | printf("Compiling %d scripts took %f seconds.\n", scriptCount, timeDiff(&thisTime2, &lastTime2)); | ||
186 | 194 | ||
187 | // ecore_main_loop_begin(); | 195 | // ecore_main_loop_begin(); |
188 | 196 | ||