Read System Clock in Windows
Hello,
I'm writing a program that requires that I generate random numbers. I'm
using the C rand()function. I want to use the system clock as a seed
for the function. How do I read the system clock in Windows? (Please
state any libraries I'm going to need etc).
Thanks,
Moikel
.
Relevant Pages
- [PATCH] /dev/time for Linux, inspired by Plan 9
... reading or writing text strings to a special file named /dev/time. ... epoch seconds, nanoseconds since start of epoch, ... /dev/time sets the system clock to the given number of epoch seconds. ... +that is provided by the Plan 9 operating system from Bell Laboratories. ... (Linux-Kernel) - [PATCH] /dev/time for Linux, inspired by Plan 9
... reading or writing text strings to a special file named /dev/time. ... nanoseconds since boot, and nanoseconds per second. ... to /dev/time sets the system clock to the given number of epoch seconds. ... +that is provided by the Plan 9 operating system from Bell Laboratories. ... (Linux-Kernel) - Re: Read System Clock in Windows
... I'm writing a program that requires that I generate random numbers. ... I want to use the system clock as a seed ... But the OP should be concerned about including the correct header. ... Remove del for email ... (comp.lang.c) - Re: Read System Clock in Windows
... Moikel said: ... I'm writing a program that requires that I generate random numbers. ... I want to use the system clock as a seed ... rjh at above domain ... (comp.lang.c) - Re: Read System Clock in Windows
... I'm writing a program that requires that I generate random numbers. ... How do I read the system clock in Windows? ... I can imagine some things you need high resolution timing for, but seeding a RNG isn't one of them -- and if you do need that for some reason, you should probably use your own RNG in the first place, rather than use rand. ... (comp.lang.c) |
|