A computer system, comprising: a processor; and a computer readable storage medium having stored thereon program code that, when executed by the processor, causes the processor to: determine an initial set of parameter values for implementing one or more time dilation algorithms with respect to a program, wherein the one or more time dilation algorithms cause the program to observe a dilated view of time relative to real time; apply the initial set of parameter values to the one or more time dilation algorithms; detect an event that causes a change in the current runtime environment; determine a new set of parameter values responsive to the change; and apply the new set of parameter values to the one or more time dilation algorithms, characterized in that the initial set of parameter values and the new set of parameter values responsive to the change are determined via a plurality of proof-of-concept, POC, functions that take into account a current runtime environment of the computer system, wherein each POC function is configured to run a simulation of a particular type of timing attack and, based on the simulation, to output a set of parameter values for the one or more time dilation algorithms that are deemed to be appropriate for mitigating the particular type of timing attack in view of the current runtime environment. a processor; and a computer readable storage medium having stored thereon program code that, when executed by the processor, causes the processor to: determine an initial set of parameter values for implementing one or more time dilation algorithms with respect to a program, wherein the one or more time dilation algorithms cause the program to observe a dilated view of time relative to real time; apply the initial set of parameter values to the one or more time dilation algorithms; detect an event that causes a change in the current runtime environment; determine a new set of parameter values responsive to the change; and apply the new set of parameter values to the one or more time dilation algorithms, characterized in that the initial set of parameter values and the new set of parameter values responsive to the change are determined via a plurality of proof-of-concept, POC, functions that take into account a current runtime environment of the computer system, wherein each POC function is configured to run a simulation of a particular type of timing attack and, based on the simulation, to output a set of parameter values for the one or more time dilation algorithms that are deemed to be appropriate for mitigating the particular type of timing attack in view of the current runtime environment. determine an initial set of parameter values for implementing one or more time dilation algorithms with respect to a program, wherein the one or more time dilation algorithms cause the program to observe a dilated view of time relative to real time; apply the initial set of parameter values to the one or more time dilation algorithms; detect an event that causes a change in the current runtime environment; determine a new set of parameter values responsive to the change; and apply the new set of parameter values to the one or more time dilation algorithms, characterized in that the initial set of parameter values and the new set of parameter values responsive to the change are determined via a plurality of proof-of-concept, POC, functions that take into account a current runtime environment of the computer system, wherein each POC function is configured to run a simulation of a particular type of timing attack and, based on the simulation, to output a set of parameter values for the one or more time dilation algorithms that are deemed to be appropriate for mitigating the particular type of timing attack in view of the current runtime environment.