Skip to content

Instantly share code, notes, and snippets.

@visionik
Created February 27, 2009 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save visionik/71299 to your computer and use it in GitHub Desktop.
Save visionik/71299 to your computer and use it in GitHub Desktop.
function _parseTime(time){ // convert float second to integer milliseconds
return Math.max(0, parseInt(parseFloat(time)*1000));
}
function _handleCallBack(cb, ev){
try {
if(ev){
cb(ev);
}
else{
cb();
}
} catch (e){
log(e.message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment