millisecond timer 
Author Message
 millisecond timer

I'm wondering whether there is a way to come up with a timer that would
be precise down to 50 milliseconds or so.  (for synchronization of the
client parameters on a central server process)

One suggestion I found was to time the disk writes, and record the amt
of data written.  Then write the known qnt of data and thus get the
time.

Besides obvious implementation difficulties, this would not work in my
case, as the server needs to keep track of multiple clients and compute
parameters on the fly.  Thus what would be ideal is a fxn similar to
time() or clock() in <time.h>, but with a greater precision...

Any help is appreciated.

Thanks!
-B.A.M



Thu, 15 Nov 2001 03:00:00 GMT  
 millisecond timer

in comp.lang.c:

Quote:
> I'm wondering whether there is a way to come up with a timer that would
> be precise down to 50 milliseconds or so.  (for synchronization of the
> client parameters on a central server process)

> One suggestion I found was to time the disk writes, and record the amt
> of data written.  Then write the known qnt of data and thus get the
> time.

> Besides obvious implementation difficulties, this would not work in my
> case, as the server needs to keep track of multiple clients and compute
> parameters on the fly.  Thus what would be ideal is a fxn similar to
> time() or clock() in <time.h>, but with a greater precision...

> Any help is appreciated.

> Thanks!
> -B.A.M

<Jack>

Timing disk writes is an obvious folly.  If you want something that
the standard C timing functions can't give you, you will have to
investigate compiler or operating system specific non-standard
extensions.  That takes it outside the scope of the C language and
this newsgroup, even if you had mentioned your compiler and operating
system.

There are many newsgroups supporting most popular operating systems
and compilers, find one and ask there.

</Jack>
--
Do not email me with questions about programming.
Post them to the appropriate newsgroup.
Followups to my posts are welcome.



Thu, 15 Nov 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. millisecond timer

2. source code for millisecond timer

3. HELP: VC++ 4.2 need reliable millisecond timer routine

4. Millisecond timer

5. Suggestions for a sub-millisecond timer?

6. Wanted: millisecond accurate timer.

7. C timer millisecond?

8. timers (in milliseconds)

9. Timers, Timers, Timers...

10. System.Timers.Timer & System.threading.Timer

11. Timer interrupts and timer ticks

12. timeSetEvent hangs when new timer is created whilst other timer is in callback

 

 
Powered by phpBB® Forum Software