[complement-svn] SF.net SVN: complement: [1571] trunk/complement/explore/test/virtual_time
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-05-24 17:15:46
|
Revision: 1571 http://svn.sourceforge.net/complement/?rev=1571&view=rev Author: complement Date: 2007-05-24 10:15:39 -0700 (Thu, 24 May 2007) Log Message: ----------- development Modified Paths: -------------- trunk/complement/explore/test/virtual_time/vtime.cc trunk/complement/explore/test/virtual_time/vtime_main.cc Modified: trunk/complement/explore/test/virtual_time/vtime.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-24 07:09:05 UTC (rev 1570) +++ trunk/complement/explore/test/virtual_time/vtime.cc 2007-05-24 17:15:39 UTC (rev 1571) @@ -370,6 +370,14 @@ cout << ev.value().gvt.gvt << endl; cout << order_correct( ev ) << endl; + + if ( order_correct( ev ) ) { + gvtime_type::const_iterator gr = ev.value().gvt.gvt.begin(); + gvtime_type::const_iterator ge = ev.value().gvt.gvt.end(); + for ( ; gr != ge; ++gr ) { // over all groups + vt[gr->first] = max( vt[gr->first], vt[gr->first] + gr->second.vt ); + } + } } bool Proc::order_correct( const stem::Event_base<VTmess>& ev ) Modified: trunk/complement/explore/test/virtual_time/vtime_main.cc =================================================================== --- trunk/complement/explore/test/virtual_time/vtime_main.cc 2007-05-24 07:09:05 UTC (rev 1570) +++ trunk/complement/explore/test/virtual_time/vtime_main.cc 2007-05-24 17:15:39 UTC (rev 1571) @@ -27,7 +27,7 @@ vtime_group_type gvt; gvt.first = 0; // group - gvt.second += make_pair( 101, 1 ); + gvt.second += make_pair( 100, 1 ); mess.value().mess = "Hello!"; mess.value().grp = 0; @@ -35,6 +35,11 @@ m1.Send( mess ); + mess.value().gvt += gvt; + + mess.value().mess = "How are you?"; + m1.Send( mess ); + cnd.wait(); return 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |