Re: Werte für das C'sche srand()
Ferdinand Ihringer <[email protected]>
| Newsgroups | gmane.linux.suse.programming |
|---|---|
| Message-ID | <[email protected]> |
On Thursday 14 October 2004 02:51, David Haller wrote:
[..]
> Schau mal in /usr/src/linux/drivers/char/random.c (v.a. auch die
> Kommentare) und schau mal, ob du da nicht noch ein "besseres"
> Zufallselement in den seed reinbekommst.
Ich sah eben mal drüber und fand erstmal nichts.
[..]
> Ob und wie du unter Win* an Zufallsdaten oder zumindest an eine
> genauere "Zeit" als 'time()' rankommst weiß ich nicht. Vorhanden ist
> sowas aber wohl.
Ja, es müsste sogar GetTimeOfDay (wenn auch mit double als Rückgabewert)
geben. Das gibt es zumindest bei Delphi und das dürfte dort als Teil der
Win-API sein...
> Da musst du dann halt wohl oder übel mit ein paar #defines / #ifdefs
> rumwerfen.
Das werde ich wohl tun müssen.
> --
> "It's fifteen hundred miles to Ankh-Morpork, we've got three hundred and
> sixty-three elephants, fifty carts of forage, the monsoon's about to break
> and we're wearing... we're wearing... sort of things, like glass, only
> dark... dark glass things on our eyes... ... Let's go!" -- T. Pratchett,
> "Moving Pictures"
Aber da ist es doch für dich schon deutlich schwerer, alle lustigen Sentenzen
aus Scheibenweltromanen zu siggen...
Ferdinand
--
Um die Liste abzubestellen, schicken Sie eine Mail an:
[email protected]
Um eine Liste aller verfügbaren Kommandos zu bekommen, schicken
Sie eine Mail an: [email protected]