view src/alice/test/codesegment/local/TestCodeSegment.java @ 184:4475ba30238f working

minor change
author e095732
date Wed, 27 Feb 2013 06:30:14 +0900
parents 75150396681c
children a85ff8dc16c1
line wrap: on
line source

package alice.test.codesegment.local;

import alice.codesegment.CodeSegment;
import alice.datasegment.CommandType;
import alice.datasegment.Receiver;

public class TestCodeSegment extends CodeSegment {
	
	static int count = 0;
	
	// create input datasegment arg1
	Receiver arg1 = ids.create(CommandType.PEEK);
	public TestCodeSegment(){
		arg1.setKey("key1");
	}
	public TestCodeSegment(int index){
		arg1.setKey("key1",index);
	}
	
	@Override
	public void run() {
		if(count > 10000){
			System.out.println(System.currentTimeMillis() - StartCodeSegment.t);
			System.exit(1);
		}
		
		//ods.update("key1",arg1.asInteger()+1);
		new TestCodeSegment();
		
		//new TestCodeSegment(arg1.index);
		
		count++;
		// DataSegment.get("local").update
		//ods.update("local", "key1", arg1.index);
		
	}

}