fix hello example

This commit is contained in:
Rafael Magana 2014-07-31 18:45:18 -05:00
parent 25e144b843
commit 833bec5f00
2 changed files with 12 additions and 9 deletions

View File

@ -4,15 +4,17 @@ Cylon.robot({
connection: { name: 'loopback', adaptor: 'loopback' },
device: { name: 'ping', driver: 'ping' },
commands: ['test'],
test: function(greeting) {
return greeting + " world";
},
work: function() {
every((60).seconds(), console.log);
every((1).seconds(), function(){
console.log("Hello, human!")
});
after((5).seconds(), function(){
console.log("I've been at your command for 5 seconds now.")
});
}
});
//Cylon.api({host: '0.0.0.0', port: '3005'})
Cylon.start();

View File

@ -20,8 +20,9 @@ message after ten seconds have elapsed.
console.log("Hello, human!")
});
after((10).seconds(), function() {
console.log "Impressive."
// This will happen only one time at the 5th second
after((5).seconds(), function() {
console.log("I've been at your command for 5 seconds now.")
});
}