When I make a connection with the remote host, I get a system message in the bottom right hand corner that tells me the time connected. Is there a property that I can access through Aspect that will tell me this ?
I'm not aware of a method to get this information from a script. One workaround that I can think of if is to use a when $CARRIER command to call a procedure to set a long global variable with the current value of $LTIME. You would want this procedure to do this only if $CARRIER was equal to 1, indicating that a connection currently existed. The script could then subtract that value from the current value of $LTIME at some point in the future to get the elapsed time of the current connection. Here's a rough start on such a script. Some formatting would need to be done on the time displayed in the status line as it doesn't break down into hours, minutes, and seconds.
long lStartTime
proc main
long lDiffTime
when $CARRIER call start_timer
while 1
yield
lDiffTime = $LTIME - lStartTime
statmsg "Current connection time = %d" lDiffTime
endwhile
endproc
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.