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' }, connection: { name: 'loopback', adaptor: 'loopback' },
device: { name: 'ping', driver: 'ping' }, device: { name: 'ping', driver: 'ping' },
commands: ['test'],
test: function(greeting) {
return greeting + " world";
},
work: function() { 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(); Cylon.start();

View File

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