I am trying to time TCP/IP transfers between two boxes. I'd love to be able to take a look at how the ttcp included with Suse8.1 is programmed, but can't find the sources anywhere.
So, I just took one of the echoserver/echoclient examples floating around (from Paul Griffiths, to be exact) and adapted it.
The transfer part works fine using send and recv, but I can't time the stuff! Tried to use times(), which is said to return the elapsed ticks since boottime, but I always get 0 back!
sysconf(_SC_CLK_TCK) returns 100 ticks/sec, btw.
Can somebody please tell me what I'm doin' wrong, or, even better, tell me how to measure with (sub)millisecond resolution?
Thanks in advance,