Thread overview | |||||
---|---|---|---|---|---|
|
February 18, 2003 getUTCtime in linux | ||||
---|---|---|---|---|
| ||||
Hi, i wrote a program in D in win32 (commandline), and it works fine. then i decided i would try and compile it using the linux port of D from www.opend.org it works, but only if i comment out my usage of getUTCtime(). the error message is this: [root@lvs dli-0.1.2]# ./dli passGen.d passGen.o: In function `__endif_599': passGen.o(.text+0x30ff): undefined reference to `_D4date_10getUTCtime_FZl' collect2: ld returned 1 exit status what im using it for, is to further randomise the random seed when creating the random number generator. is there a way i can make getUTCtime() work in linux? or some other time function i can use that will work? or even some other method of getting a unique number for the rand_seed() func? thanks, Nick |
February 20, 2003 Re: getUTCtime in linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to nick.fletcher | <nick.fletcher@dingoblue.com.au> wrote in message news:b2s6a2$25oe$1@digitaldaemon.com... > or even some other method of getting a unique > number for the rand_seed() func? > thanks, One popular way is to use the chip cycle counter: ulong read_timer() { asm { naked; rdtsc; } } |
February 26, 2003 Re: getUTCtime in linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | In article <b33auk$2psi$1@digitaldaemon.com>, Walter says... > > ><nick.fletcher@dingoblue.com.au> wrote in message news:b2s6a2$25oe$1@digitaldaemon.com... >> or even some other method of getting a unique >> number for the rand_seed() func? >> thanks, > >One popular way is to use the chip cycle counter: > >ulong read_timer() >{ > asm > { naked; > rdtsc; > } >} > thanks, but linux doesnt support asm{ } yet :) |
Copyright © 1999-2021 by the D Language Foundation