Created
January 25, 2010 01:27
-
-
Save tolmasky/285563 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function code_block() | |
{ | |
function print_something() | |
{ | |
console.log(something); | |
} | |
date = new Date(); | |
function task_1() | |
{ | |
var something = long_operation(); | |
print_something(); | |
}(); | |
if (new Date() - date > slow_script_interval) | |
window.setTimeout(task_2, 0); | |
else | |
task_2(); | |
function task_2() | |
{ | |
var something = long_operation(); | |
print_something(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment