Add info to documentation about random numbers, initialize srand (#2056)
Issue #2053 has highlighted the fact that random numbers are always generated with the same seed. An example of generating different random numbers, other than the original seed, has been added to the documentation. Furthermore srand initialization has been added to jerry-main, and targets. Update test-common.h with srand call. JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
committed by
László Langó
parent
678fcb20ed
commit
4690d128b3
@@ -97,6 +97,7 @@ const shell_command_t shell_commands[] = {
|
||||
|
||||
int main (void)
|
||||
{
|
||||
srand ((unsigned) jerry_port_get_current_time ());
|
||||
printf ("You are running RIOT on a(n) %s board.\n", RIOT_BOARD);
|
||||
printf ("This board features a(n) %s MCU.\n", RIOT_MCU);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user