Changeset 121ac13 for src/tests/datingService.c
- Timestamp:
- Nov 6, 2017, 10:28:17 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- bbeb908
- Parents:
- 59a0bde (diff), 9f4524b (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/datingService.c
r59a0bde r121ac13 9 9 // Created On : Mon Oct 30 12:56:20 2017 10 10 // Last Modified By : Peter A. Buhr 11 // Last Modified On : Mon Oct 30 17:58:41 201712 // Update Count : 1 411 // Last Modified On : Mon Oct 30 23:02:11 2017 12 // Update Count : 15 13 13 // 14 14 15 #include <stdlib> // rand 4815 #include <stdlib> // random 16 16 #include <fstream> 17 17 #include <kernel> … … 57 57 58 58 void main( Girl & g ) { 59 yield( rand 48( 100 ) ); // don't all start at the same time59 yield( random( 100 ) ); // don't all start at the same time 60 60 unsigned int partner = girl( g.TheExchange, g.id, g.ccode ); 61 61 //sout | "Girl:" | g.id | "is dating Boy at" | partner | "with ccode" | g.ccode | endl; … … 75 75 76 76 void main( Boy & b ) { 77 yield( rand 48( 100 ) ); // don't all start at the same time77 yield( random( 100 ) ); // don't all start at the same time 78 78 unsigned int partner = boy( b.TheExchange, b.id, b.ccode ); 79 79 //sout | " Boy:" | b.id | "is dating Girl" | partner | "with ccode" | b.ccode | endl; … … 92 92 Boy *boys[NoOfPairs]; 93 93 94 rand 48seed( getpid() );94 random_seed( getpid() ); 95 95 96 96 for ( unsigned int i = 0; i < NoOfPairs; i += 1 ) {
Note: See TracChangeset
for help on using the changeset viewer.