Re: Read System Clock in Windows



On Fri, 14 Jul 2006 22:27:28 +0000, Richard Heathfield
<invalid@xxxxxxxxxxxxxxx> wrote:

Moikel said:

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.

http://c-faq.com/lib/srand.html

How do I read the system clock in Windows?

time()

(Please
state any libraries I'm going to need etc).

The standard library, which is linked in by default so you don't need to
worry about it.

But the OP should be concerned about including the correct header.


Remove del for email
.



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: Vince on Larry King tonight (1/1)
    ... George W. Bush knew it was all Don Del ... Grande's fault by writing: ... King shows where they don't take phone calls? ...
    (rec.sport.pro-wrestling)
  • 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: A newbie in more need....
    ... Chris Patton wrote: ... > I am writing a program that writes a number of classes, ... Amor Ministries ...
    (comp.lang.python)