コード例 #1
0
 static IEnumerable<Event> Machine(Environment env, Resource packer)
 {
     while (true) {
     yield return env.TimeoutNormalPositive(MachineProcTimeMu, MachineProcTimeSigma);
     var token = packer.Request();
     yield return token;
     delay += env.Now - token.Time;
     env.Process(Pack(env, packer, token));
       }
 }
コード例 #2
0
 static IEnumerable<Event> Pack(Environment env, Resource packer, Request token)
 {
     yield return env.TimeoutNormalPositive(PackerProcTimeMu, PackerProcTimeSigma);
       packer.Release(token);
 }