How may I detect using a C program that a DTR on async port is set for a specific period of time?