Managed code (whatever on device or desktop) is subject to random stops for GC, so no, in generally you cannot. On another hand if response time is within second it is probably fine.
If you need hard real time (e.g. response time in range of milliseconds) then you need real time OS, C++ and adhere to certain rules in your application.
This posting is provided "AS IS" with no warranties, and confers no rights.