Pergunta de entrevista da empresa Sony

You have three functions: 1. Get global time 2. Stop timer(after stop it store it in variable) 3. Restart timer You should write a function that get actionFunction. The function will return after 50ms. B. The function gets a lot of functions(some of them take more than 50ms) and you should return from the function the closest ms to number of functions multiple 50ms Note: You gets the function one by one and don’t know how much in the overall

Resposta da entrevista

Sigiloso

12 de jul. de 2024

Sleep the difference between the overall time and 50*counter-functions, if the difference bigger than 0