Larry, Ed
First of all thanks for your replies.
Well, I'd already did the that function and it works reasonably well (there is a fluctuation of +1/-1 secs, but is ok for me because I don't need more accuracy than that) and is also reasonably fast (it checks the gap in .005 secs).
The problem with this approach is: the function that needs that info (it checks that several other programs are running, issuing a warning if they're not) is called many times per second. But the same function can be called from other programs just once or a random number of times.
I can solve this problem passing a parameter to tell the function if it must get the gap, and then each caller program can take the proper action (ie. only ask to check the gap every n seconds/minutes/hours) But in order to accomplish this I must rebuild various projects, something I wanted to avoid.
Anyway I think I will take this approach on monday and close the case.
Thanks again, and I hope that what I wrote is clear, I'm not convinced I can understand it!
Hugo
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges