"use strict"; function init_stop_watch() { global_stop_watch = null; global_stop_watch_time = 0; start_stop_watch(); } function start_stop_watch() { //if the timer id of the clock is inactive, its value //will be null. if the clock is currently in action, it //will have the value of an integer which represents the //setTimeout timer id value. if the setTimeout timer is //numeric, then it is currently in use and cannot be //called again until it has completed the time cycle and //reset back to null. this prevents any intteruption, //or conflict in case there is a setTimeout function call //before a tick-tock cycle has been completed. if (global_stop_watch === null) { global_stop_watch = setTimeout(function () { //tick tock code goes here. stop_watch_tick_tock(); //cancel and reset the global stop watch timer id clearTimeout(global_stop_watch); //set the variable to null so that it can run another cycle global_stop_watch = null; //restart the time cycle process. start_stop_watch(); }, 50); } } function stop_watch_tick_tock() { global_stop_watch_time = global_stop_watch_time + 50; document.body.setAttribute("data-stop_watch_time_value", global_stop_watch_time.toString()); //2024-05-14: //exit the function. the code below isn't complete. //it will be completed in the future. return; if (typeof global_stop_watch_time === "number") { if (global_stop_watch_time >= 0) { if (global_stop_watch_time <= Math.pow(10, 6)) { time_interval_actions(global_stop_watch_time); } else { global_stop_watch_time = 0; } } } } function time_interval_actions(time_value = 1) { var j = null; var j_value = null; var j_increment = null; var j_minimum = null; var k = null; var k_value = null; var k_increment = null; var k_minimum = null; var l = null; var l_value = null; var l_increment = null; var l_minimum = null; //if the argument of time_value is a valid number, //continue. otherwise, exit the function. if (typeof time_value === "number") { if (time_value >= 0) { //continue } else { return; } } else { return; } j_value = 10000; j_increment = -1000; j_minimum = 1000; for (j = j_value; j >= j_minimum; (j = j + j_increment)) { if (j > 50000) { return; } if ((j % j_increment) === 0) { log_time_increments(j); //2024-05-18: //set all windows' zIndex property in order. tabbed windows are set //with the lowest zIndex. cascaded windows are set next. minimized //windows are set next. finally, the maximized window(s) are set. //see file: 'window_2.js' ////set_all_window_zIndexes(); } } k_value = 1000; k_increment = -100; k_minimum = 100; for (k = k_value; k >= k_minimum; (k = k + k_increment)) { if (k > 50000) { return; } if ((k % k_increment) === 0) { log_time_increments(k); ////alert("test"); //2024-05-18: //set all windows' zIndex property in order. tabbed windows are set //with the lowest zIndex. cascaded windows are set next. minimized //windows are set next. finally, the maximized window(s) are set. //see file: 'window_2.js' ////set_all_window_zIndexes(); } } l_value = 100; l_increment = -10; l_minimum = 10; for (l = l_value; l >= l_minimum; (l = l + l_increment)) { if (l > 50000) { return; } if ((l % l_increment) === 0) { log_time_increments(l); } } } function log_time_increments(num = 0) { var time_stamp = null; if (typeof num === "number") { if (num >= 0) { time_stamp = num; if (typeof global_stop_watch_time === "number") { if (global_stop_watch_time >= 10) { console.log("timestamp logged: " + time_stamp + " from time: " + global_stop_watch_time); } } } } }