I had a crazy idea 2 days ago: Create a profiler for lite-c(measuring time that functions need to execute). Even tough I'm no more developing in 3dgs, it seemed interesting. Soo today I got a simple version working.

To use it, you just need to include my c file anywhere inside your project:
Php Code:
#include "AKProfiler.c" 



and it will log all function calls/waits into a file:
Php Code:
functionName,status,timeSinceStart
main,start,0
main,pause,31
npc_init_startup,start,31
npc_init_startup,stop,47
main,resume,47
move_npc,start,47
move_npc,pause,47
main,stop,47 




It will however not log engine function calls.

How it works:
AKProfiler.c has a startup function that execute immediatly when the engine starts and stops the game.
It then looks for the main file of your project(First command line parameter).
Next it parses that file and all files that are included into that file.
It creates new temporary files for all these files with profiler functions injected at function starts/ends and wait's.
Then it executes the main temporary file in a new acknex process.
That process is now your game with profiling functions included in the scripts.
When the process ends, it deletes all temporary files.

It's magic!

I'm still not sure how to exactly represent the profiled information. Currently I'm importing the file into excel and generate some charts(pie chart of functions that needed the most time f.i.).

Maybe I will relase a first version this evening if anyone is interested.