Patent ID: 7926040

Claim:
In a computer system having an operating system (OS) and associated Korn Shell (KSH), a method comprising: initiating the execution of a user-specified block of code within the KSH; concurrently executing a secondary process within the KSH that activates a clock timer, wherein said secondary process generates a time-code function utilizing a Korn shell script, which utilizes a plurality of time-code variables to measure the execution time of the user-specified block of code, and wherein the secondary process provides a threshold maximum execution time (threshold time) within which execution of the block of code is to be completed; wherein said secondary process completes the functions of: when execution of a first line of code within the block of code is initiated, capturing a current time from a system clock of the computer system that changes time in set time intervals and recording the current time in a starting point variable within system memory; and dynamically terminating execution of the block of code when the execution time reaches the threshold time; and when the block of code completes executing before the clock timer reaches the threshold time: automatically stopping the clock timer; and outputting elapsed time on the clock timer indicating actual execution time for executing the block of code.