For example I want to provide user with a prompt
print("do this within 3 seconds or time will be up.")
And when time 3 second passes, it should prompt another message saying,
print("Your time is up, you failed.")
So far I have figured out to get the current time using DateTime current = new DateTime();
and the three seconds later time with DateTime threeSeconds = current.add(new Duration (seconds : 3));
but I can't figure out how to force user to enter something within those two times.