🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: aus.computers.java
1 messages
1 total messages Started by Alex Thomas Sat, 06 Sep 2003 17:58
Timeout Class
#155
Author: Alex Thomas
Date: Sat, 06 Sep 2003 17:58
17 lines
1477 bytes
I need to know how to write a class that is a simple thread to measure a
timeout period.  I should work something like this:

Timer T = new Timer(60000);

T.start();
veryImportantMethod();
T.stop();

If the veryImportantMethod method takes more than 60 seconds T will throw an
exception.

Can anyone help me out with this?



-Alex
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads