Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- long starttime = get_time(); // Just a function to get the time
- long timeslice_id = get_scheduler_timeslice(); // This is what I am looking for
- do_lengthy_things();
- print("Code took %d ms to run.", get_time() - starttime);
- if (get_scheduler_timeslice() != timeslice_id)
- print("There was a task switch while running this code, don't wonder about the time.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement