I'm working on a android project (Java) which is basically a problem solving platform. The user code will run on user's device itself. As different users will use different hardware, the performance of executing the code will vary AFAIK. I want to show Time/Memory limit exceed based on time taken to execute code. As performance will be different, same code in different devices may show different result(time/memory taken)causing wrong verdict. How I can adjust these differences and get a standard calculations to show same verdict for same code in different devices? I wanted to use Judge0,Replit API earlier but there are some problems so I decided to not to use. Also If anyone knows how exactly (based on runtime, memory consume or other ways) platforms like Leetcode, Codeforces shows these Limit exceed verdict, please share.
I tried JudgeO, but some has some limitations in the free package. So, I decided to use user's device itself. May be it is dumb.