Let's say there is an imaginary operating system...
There is a function in it called settime that gets a pointer to function and a timestamp.
The catch is that every time the function is called it runs over the last call (so only the new function being provided as parameter will be called).
I want to expose a new function to my users called settime2, which will allow users to call it, and time a function without destroying the previous calls.
In the settime2 implementation I can call settime. and getcurrenttime. and even call settime with settime or settime2 as the function pointer argument.
Any advice?
thanks