I'm implementing the x-modem protocol in Java. If there is a timeout while I'm receiving a packet then I have to send negative acknowledgment. I have to start a timer, and when the time is up then I send a message to the sender requesting file transfer from the begining.
But I'm not getting how to do timers in Java; may I see some sample code? Thank you.