PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

time.h missing

It sounds crazy but I don't have time.h. I need it for srand, because GetTickCount doesnt produce 'good' random numbers. Could anyone please send it to: florian_brede@hotmail.com?
There is no implementation for the time function in CE. Even if you have the header file the linker will not be able to resolve the routines you call.

GetTickCount should provide just as good a seed for srand. If you want to duplicate the behavior of time (in that you are seeding with seconds instead of milliseconds), then just divide the value returned by GetTickCount by 1000.

Dan East
ok, but if im calling rand()%100 for example, i get 0,5,10,15,20,... as 'random' values. 8O
And what's wrong with those values? ;) Perhaps if you posted more of the exact source code that fails we can see if there are any errors.

Dan East