How to find currnet time in Microseconds? 
Author Message
 How to find currnet time in Microseconds?

Hi,
I would like to know how I can find the current time in microseconds.

I need to find transmission delay for data transfer between two
machines. I'm using the gettimeofday() to get the time difference. But
problem is that it is given a value of the order of 10^78.

I would thus not be able to calculate the time differnce between the two
values used by two programs on two different machines.

Knidly suggest me a method of finding current time of day in
microseconds.

Thanks in advance.

Fasahat



Mon, 13 Nov 2000 03:00:00 GMT  
 How to find currnet time in Microseconds?



Quote:
>Hi,
>I would like to know how I can find the current time in microseconds.

There is no portable way to do this and on many platforms no way to
do it at all (assuming you want microsecond resolution). If you didn't
want that you could always take a time in seconds and multiply it by
a million.

Quote:
>I need to find transmission delay for data transfer between two
>machines. I'm using the gettimeofday() to get the time difference. But
>problem is that it is given a value of the order of 10^78.

The comp.lang.c answer is that the language has no gettimeofday() function.
This is nest asked in a Unix related newsgroup such as comp.unix.programmer.
If it is giving strange results then you are most likely not using it
correctly. However it would be difficult to diagnose that without seeing
your code. 10^78 suggests that you've managed to do some sort of floating
point conversion which is suspect. Check carefully how you are displaying
the results. If you are using *printf() check that you have used the
correct conversion specifier.

--
-----------------------------------------


-----------------------------------------



Tue, 14 Nov 2000 03:00:00 GMT  
 How to find currnet time in Microseconds?

The way I would do it would be to put NTP on both systems, wait a week while they get nice and
synchronized, and then run your tests.

--
J. Buck Caldwell

               Engineer - Technical Support - Webmaster

PO Box 8470            http://www.polygon.com/     fax: (314) 997-9696
St. Louis, MO 63132     ftp://ftp.polygon.com/     bbs: (314) 997-9682



Sun, 19 Nov 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Get current time microseconds

2. Time in Microseconds !!!

3. Get current time microseconds

4. microsecond timing delays in Visual C/C++

5. How to get Julian time and microseconds?

6. How to get microseconds from Julian time

7. How to measure microsecond time intervals?

8. Microsecond timing accuracy

9. Time in Microseconds !!!

10. Time in Microseconds !!!

11. function for timing in microseconds?

12. <HELP> microsecond timing resolution using C.

 

 
Powered by phpBB® Forum Software