On Windows, ' GetTickCount()' is usually used for this which returns number of milliseconds passed since the Windows has been up ('If no of milliseconds passed since the last tick count is more than 16ms, render a new frame else continue.'). Computer games often need to render 60 frames / second and to make this happen they need to call the rendering function every 16.6ms. According to this page, there are around 480+ system calls in Windows NT kernel.įor any purpose that deals with the hardware, programs usually resort to system calls because that's what OS does best and one of these things happen to be knowing time. Each OS has a different set of calls but often they do similar things like - allocating memory, reading and writing files, or handling processes. :)Ī computer program usually communicates with the kernel using predefined functions called system calls. Three years later, I think I know enough to answer my own question.