Skip to content

Instantly share code, notes, and snippets.

@chensoren
Created September 16, 2011 01:48
Show Gist options
  • Save chensoren/1220991 to your computer and use it in GitHub Desktop.
Save chensoren/1220991 to your computer and use it in GitHub Desktop.
execute action after specify time
loadCmdStatus = function() {
$.getJSON('/command/9857438925794/status', function(cmdReq) {
var now = new Date();
beginTime = now.getTime();
if (cmdReq.executed == '1' || cmdReq.executed == '0' || cmdReq.executed == '-1') {
} else {
}
});
}
setTimeout(loadCmdStatus, 5000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment