AForge.Robotics.Surveyor.SRV1.GetRunningTime C# (CSharp) Method

GetRunningTime() public method

Get SRV-1 running time.
Not connected to SRV-1. Connect to SRV-1 before using /// this method. Connection lost or communicaton failure. Try to reconnect. Failed parsing response from SRV-1.
public GetRunningTime ( ) : long
return long
        public long GetRunningTime( )
        {
            byte[] response = new byte[100];

            int read = SendAndReceive( new byte[] { (byte) 't' }, response );

            string str = System.Text.ASCIIEncoding.ASCII.GetString( response, 0, read );

            str = str.Replace( "##time - millisecs:", "" );
            str = str.Trim( );

            try
            {
                return long.Parse( str );
            }
            catch
            {
                throw new ApplicationException( "Failed parsing response from SRV-1." );
            }
        }