mirror of
https://github.com/boostorg/test.git
synced 2026-01-26 07:02:12 +00:00
47 lines
897 B
HTML
47 lines
897 B
HTML
<html>
|
|
<head>
|
|
<script language="javascript">var viso_path=".."</script>
|
|
<script language="javascript" src="../core.js" > </script>
|
|
<script language="javascript">
|
|
JS.include( "scheduler_api.js", viso_path );
|
|
</script>
|
|
<script>
|
|
|
|
test_func0.index = 0
|
|
function test_func0() {
|
|
alert( test_func0.index++ );
|
|
|
|
if( test_func0.index >= 10 ) {
|
|
test_func0.index = 0;
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
function call_back() {
|
|
alert( "call_back" );
|
|
}
|
|
|
|
test_func1.index = 0
|
|
function test_func1( step ) {
|
|
alert( test_func1.index );
|
|
test_func1.index += step;
|
|
|
|
if( test_func1.index >= 10 ) {
|
|
test_func1.index = 0;
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
TaskScheduler.schedule( new Callback( test_func0 ) );
|
|
TaskScheduler.schedule( new Callback( test_func1, null, 2 ), 100, false, new Callback( call_back ) );
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
</body>
|
|
</html>
|