Changeset 231b3fd in mainline for uspace/lib/c/generic/rndgen.c
- Timestamp:
- 2018-08-25T21:35:26Z (7 years ago)
- Parents:
- e2625b1a (diff), 3c45353 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jakub Jermář <jakub@…> (2018-08-25 21:35:26)
- git-committer:
- GitHub <noreply@…> (2018-08-25 21:35:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/rndgen.c
re2625b1a r231b3fd 52 52 { 53 53 rndgen_t *rndgen; 54 struct time val tv;54 struct timespec ts; 55 55 56 56 rndgen = calloc(1, sizeof(rndgen_t)); … … 59 59 60 60 /* XXX This is a rather poor way of generating random numbers */ 61 get timeofday(&tv, NULL);62 rndgen->seed = t v.tv_sec ^ tv.tv_usec;61 getuptime(&ts); 62 rndgen->seed = ts.tv_sec ^ ts.tv_nsec; 63 63 64 64 *rrndgen = rndgen;
Note:
See TracChangeset
for help on using the changeset viewer.