How to write a general code for time complexity of a program

Hey, Can someone help me with a general code for a program time complexity;I need a function to calculate the runtime for my programs execution.
What exactly do you need?
Well, there is already ready code fore you. What do you have problems with?
Topic archived. No new replies allowed.