dan@ivucsb.UUCP (Dan Howell) (03/18/89)
Is there any way to make the AUX: device time out? And return an error code on timeout? Since I don't have a battery backed up clock, and am not going to buy one just yet, I am using my roomates UNIX-PC as a clock server. I use echo >aux: atime copy aux: ram:setdate execute ram:setdate and his UNIX-PC has an account atime set aside which does nothing but return the string "date dd-mmm-yy hh:mm:ss" followed by a return and a ^\ for me to execute. The problem is that the serial port is not always connected to the Amiga, and when it isn't, the copy command just hangs there eating up my precious memory space and tying up my serial port, so that I can't do anything useful with my serial port, like talk to a modem with vt100. What I would like to be able to do is have some way for the copy command to time out, and if it does, prompt the user to enter the date. Is there any way I can do this? Thanks. -- -- Dan Howell <ivucsb!dan@anise.acc.com> -- <...!(pyramid|ucbvax)!ucsbcsl!nessus!ivucsb!dan> -- "What? TWO buttons? I don't know if I can handle that!" -- a Mac user
w-colinp@microsoft.UUCP (Colin Plumb) (03/21/89)
There's no nice way to do it from the command line. I'd write a C program using WaitForChar() to do it. Sorry. -- -Colin (uunet!microsoft!w-colinp) "Don't listen to me. I never do." - The Doctor
rokicki@polya.Stanford.EDU (Tomas G. Rokicki) (03/22/89)
> There's no nice way to do it from the command line. I'd write a C program > using WaitForChar() to do it. Sorry. Note that the second argument to WaitForChar() is in *microseconds*, not ticks, and that the Delay(0) bug can bite here too, so use a delay of at least something like 45000L. -tom