1. A non-transitory computer-readable medium embodying a program executable in a computing device, the program comprising: code that executes an application in a virtualized environment in a cloud computing resource, the virtualized environment including at least one virtualized input device; code that encodes a video signal generated by the application into a video stream; code that sends the video stream to a client; code that obtains a plurality of input commands from the client over a network with a variable amount of latency; code that compares a first time period between obtaining a first input command of the plurality of input commands and obtaining a second input command of the plurality of input commands to a second time period between when the first input command was generated in the client and when the second input command was generated in the client; and code that provides the second input command to the application through the at least one virtualized input device after a delay corresponding to a difference between the second time period and the first time period when the second time period is greater than the first time period.