Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// @desc scr_timer_set()
- gml_pragma("forceinline");
- global.code_timer = get_timer();
- ------------------------------------------------------------------------------------------------------------------------------------------
- /// @desc scr_timer_get()
- gml_pragma("forceinline");
- return string(get_timer()-global.code_timer);
- ------------------------------------------------------------------------------------------------------------------------------------------
- // THIS IS AN EXAMPLE BUT CAN BE USED AS CODE
- scr_timer_set() // Set our timer
- // Do some basic comparison work 100,000 times
- repeat(100000)
- {
- if ( a < c )
- {
- a += b;
- }
- }
- var time_result = scr_timer_get(); // Get how much time has passed in microseconds
- show_debug_message(time_result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement