Question for Windows/BeOS Developers.


Subject: Question for Windows/BeOS Developers.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Wed Aug 23 2000 - 02:31:58 CDT


Hi Windows and BeOS types,
        I need to initialize the random number generator using srand so
that we get different string of random numbers every time we invoke abi. I
want to do this to make sure the List identification number is always
unique.

In Unix I can do
 
srand( (UT_uint32) time())

Which works great. time() returns the number seconds since 1970. Is there
a similar function in windows? I just need a function that is guarenteed
to give a different result on every call. Since time always increases this
will always work :-)

I knew I'd be able to work in a Physics use somewhere :-)

Cheers

Martin



This archive was generated by hypermail 2b25 : Wed Aug 23 2000 - 02:32:12 CDT