Rainys
❔ is there an asynchronous Console.ReadLine() replacement?
hey, so i'm making a console application and main problem i'm running into is, because it's an application for a server, whenever i start writing something (i have a check that stops ReadLine if there's no letters typed in) the server gets timed out, because i have to call an update function on it every tic, so what i have currently is far from ideal, and i've looked into it and Console.ReadLine() is a synchronous function, which means it stops everything until it gets the "enter" key pressed, and i want the application to keep running in the background. Oh and honestly i wouldn't mind that much making my own system for that based on key presses if it means it's asynchronous.
8 replies
❔ How to limit while loop updates per second amount
What i mean by the name is that: for a console application i'm developing (if you're wondering it's a game's server) i need a function something similar to say, Unity's
FixedUpdate()
, so that the function only happens somewhere like 50 times a second, because while (true)
happens every single frame. or in layman's terms: How do i limit FPS?139 replies