Skip to content

Instantly share code, notes, and snippets.

@jaywon
Created March 26, 2015 11:08
Show Gist options
  • Save jaywon/ffbb4c9cfa906709a50a to your computer and use it in GitHub Desktop.
Save jaywon/ffbb4c9cfa906709a50a to your computer and use it in GitHub Desktop.
//generate new messages - need to append
//just pass the name of a function you created and an interval, this is just a reference to what function you want to execute
//at the specified interval
var newMessage = setInterval(getNewMessage, 5000);
//this is the actual function that will get called and execute at the configued interval in setInterval above.
function getNewMessage() {
console.log('get new message');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment